# Ruby

**URL:** https://www.ruby-forum.com/c/ruby/7.md?page=1933

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 1934

---

## [Ruby Hash wierdness](https://www.ruby-forum.com/t/ruby-hash-wierdness/50332)

<div class="topic-metadata">

**Author:** [@Kev\_J](https://www.ruby-forum.com/u/Kev_J)\
**Replies:** 4\
**Last updated:** [December 15, 2005, 1:54pm UTC](https://www.ruby-forum.com/t/ruby-hash-wierdness/50332 "2005-12-15T13:54:03Z")

</div>

Hi I’m having problems with using a hash. I put in a class and when I retrieve it, it’s automagically become a string ie \<%= button\_link \_(“Export CSV”), SearchParams.get\_url\_hash({ :action =\> :export\_csv, :klass =\>…

---

## [Treating 'string'+var as method](https://www.ruby-forum.com/t/treating-string-var-as-method/50333)

<div class="topic-metadata">

**Author:** [@bmgz](https://www.ruby-forum.com/u/bmgz)\
**Replies:** 2\
**Last updated:** [December 15, 2005, 12:05pm UTC](https://www.ruby-forum.com/t/treating-string-var-as-method/50333 "2005-12-15T12:05:43Z")

</div>

I am a new Ruby recruit (thanks to ahem, Rails)… What is the best way to do this: obj.‘string’+var as a method? I am currently using: obj.send(‘string’+var) …which works fine, but is this correct or bad practice?

---

## [Ruby Code & Style is looking for articles](https://www.ruby-forum.com/t/ruby-code-style-is-looking-for-articles/51894)

<div class="topic-metadata">

**Author:** [@james\_b](https://www.ruby-forum.com/u/james_b)\
**Replies:** 8\
**Last updated:** [December 15, 2005, 12:02pm UTC](https://www.ruby-forum.com/t/ruby-code-style-is-looking-for-articles/51894 "2005-12-15T12:02:42Z")

</div>

Request for Article Submissions Ruby Code & Style is looking for articles. The first issue of Ruby Code & Style hit the Web just before RubyConf 2005, and it’s time to get back in gear and roll out the next one. Ruby…

---

## [Differences between 1.8.2 and 1.8.4](https://www.ruby-forum.com/t/differences-between-1-8-2-and-1-8-4/50258)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 3\
**Last updated:** [December 15, 2005, 11:26am UTC](https://www.ruby-forum.com/t/differences-between-1-8-2-and-1-8-4/50258 "2005-12-15T11:26:27Z")

</div>

Is there any place that summarizes the major differences between Ruby 1.8.2 and Ruby 1.8.4? I’ve got Ruby 1.8.2 installed in a bunch of places and am wondering if it’s worth it to upgrade. Thanks, Joe

---

## [String mangling](https://www.ruby-forum.com/t/string-mangling/50243)

<div class="topic-metadata">

**Author:** [@dhstudio](https://www.ruby-forum.com/u/dhstudio)\
**Replies:** 7\
**Last updated:** [December 15, 2005, 11:08am UTC](https://www.ruby-forum.com/t/string-mangling/50243 "2005-12-15T11:08:10Z")

</div>

Imagine an input string aaaaabbccccceeebbbbbbbbbbeaaabaacccceeee… I have regexp for the parts a,b,c and e can be considered as else. So how can I efficiently search/step through the string from left to right, while …

---

## [Question of reference and (sub)strings](https://www.ruby-forum.com/t/question-of-reference-and-sub-strings/50259)

<div class="topic-metadata">

**Author:** [@Steve\_SRubyTalk](https://www.ruby-forum.com/u/Steve_SRubyTalk)\
**Replies:** 1\
**Last updated:** [December 15, 2005, 6:34am UTC](https://www.ruby-forum.com/t/question-of-reference-and-sub-strings/50259 "2005-12-15T06:34:23Z")

</div>

Imagine comparing using C++ and Ruby to manipulate some strings. I would like to confirm some assumptions I am making about in-memory efficiency with Ruby. (This explains why the example seems contrived and I don’t w…

---

## [String comparison](https://www.ruby-forum.com/t/string-comparison/50305)

<div class="topic-metadata">

**Author:** [@Boris\_G](https://www.ruby-forum.com/u/Boris_G)\
**Replies:** 1\
**Last updated:** [December 15, 2005, 5:07am UTC](https://www.ruby-forum.com/t/string-comparison/50305 "2005-12-15T05:07:11Z")

</div>

Hi, I have a class containing a string as an instance variable and I have a local variable containing a string. I compare these two strings with ‘==’ and with the .eql? method: ################################### o…

---

## [Re: convert seconds to hours:minutes:seconds](https://www.ruby-forum.com/t/re-convert-seconds-to-hoursseconds/50241)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 3\
**Last updated:** [December 15, 2005, 1:48am UTC](https://www.ruby-forum.com/t/re-convert-seconds-to-hoursseconds/50241 "2005-12-15T01:48:32Z")

</div>

Everytime you use printf, God kills a kitten. time = 7683 p \[time/3600, time/60 % 60, time % 60\].map{|t| t.to\_s.rjust(2, ‘0’)}.join(’:’) =\> “02:08:03” cheers Simon

---

## [JEdit Plugin Jar files please](https://www.ruby-forum.com/t/jedit-plugin-jar-files-please/50299)

<div class="topic-metadata">

**Author:** [@jules](https://www.ruby-forum.com/u/jules)\
**Replies:** 2\
**Last updated:** [December 15, 2005, 1:33am UTC](https://www.ruby-forum.com/t/jedit-plugin-jar-files-please/50299 "2005-12-15T01:33:28Z")

</div>

Hello I m trying to download and install the Jedit Ruby Plugin files, from But the download rates painfully slow (300Bytes/Sec !) so taking an hour to attempt 1Mb Ruby Jar files. Thedownloads are failing, and when i…

---

## [Raggle 0.4.4](https://www.ruby-forum.com/t/raggle-0-4-4/65027)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 0\
**Last updated:** [December 15, 2005, 1:00am UTC](https://www.ruby-forum.com/t/raggle-0-4-4/65027 "2005-12-15T01:00:21Z")

</div>

Raggle is a console RSS aggregator, written in Ruby. Features include customizable keybindings, basic HTML rendering, HTTP proxy support, OPML import/export, themes, support for various versions of RSS, Screen support…

---

## [Secure Programming in Ruby](https://www.ruby-forum.com/t/secure-programming-in-ruby/50304)

<div class="topic-metadata">

**Author:** [@John\_Knight](https://www.ruby-forum.com/u/John_Knight)\
**Replies:** 0\
**Last updated:** [December 15, 2005, 12:24am UTC](https://www.ruby-forum.com/t/secure-programming-in-ruby/50304 "2005-12-15T00:24:11Z")

</div>

A friend asked me for a book entitked “Secure Programmin in Ruby”. I don’t know of such a book in the pipeline. Where should I point him?

---

## [Getting Object From String?](https://www.ruby-forum.com/t/getting-object-from-string/50294)

<div class="topic-metadata">

**Author:** [@HunterSs\_Lists](https://www.ruby-forum.com/u/HunterSs_Lists)\
**Replies:** 2\
**Last updated:** [December 14, 2005, 11:20pm UTC](https://www.ruby-forum.com/t/getting-object-from-string/50294 "2005-12-14T23:20:36Z")

</div>

Howdy, I have a class called ‘NewsItem’. In one of my Rails classes, I have a place to pass in a string (from a HTTP parameter). That string’s value is ‘NewsItem’, the class name. How can I convert that to use as th…

---

## [jEdit Ruby Editor Plugin 0.7.6 released](https://www.ruby-forum.com/t/jedit-ruby-editor-plugin-0-7-6-released/50253)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [December 14, 2005, 10:26pm UTC](https://www.ruby-forum.com/t/jedit-ruby-editor-plugin-0-7-6-released/50253 "2005-12-14T22:26:23Z")

</div>

The jEdit Ruby Editor Plugin release 0.7.6 is available for download at: Ruby Editor Plugin for jEdit This release gives you: Introduce variable refactoring. Copy, cut, paste actions that operate on whole line when n…

---

## [Concerning the #to\_\* convention](https://www.ruby-forum.com/t/concerning-the-to-convention/100321)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 3\
**Last updated:** [December 14, 2005, 9:28pm UTC](https://www.ruby-forum.com/t/concerning-the-to-convention/100321 "2005-12-14T21:28:48Z")

</div>

Howdy partners! I’m having a bit of fun writing a Ruby XML document object model (yes, I’m aware of the fact that there already exists such models), and I’m using #to\_\* throughout the code. I’m just wondering if a #to…

---

## [Rote 0.3.0 (doc/web)](https://www.ruby-forum.com/t/rote-0-3-0-doc-web/50041)

<div class="topic-metadata">

**Author:** [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Replies:** 1\
**Last updated:** [December 14, 2005, 9:13pm UTC](https://www.ruby-forum.com/t/rote-0-3-0-doc-web/50041 "2005-12-14T21:13:44Z")

</div>

Hi, Rote 0.3.0 is now available for download from http://rote.rubyforge.org/. This is a big step for Rote, and incorporates many new features along with many improvements and fixes to existing functionality. New fe…

---

## [\#methods and #public\_instance\_methods](https://www.ruby-forum.com/t/methods-and-public-instance-methods/50266)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 3\
**Last updated:** [December 14, 2005, 7:52pm UTC](https://www.ruby-forum.com/t/methods-and-public-instance-methods/50266 "2005-12-14T19:52:51Z")

</div>

I’m trying to understand #methods and #public\_instance\_methods as I learn about introspection in Ruby. If I do String.methods in irb, I get a lot fewer listed than if I try String.public\_instance\_methods. I would hav…

---

## [Idiom wanted: do-while](https://www.ruby-forum.com/t/idiom-wanted-do-while/50096)

<div class="topic-metadata">

**Author:** [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Replies:** 22\
**Last updated:** [December 14, 2005, 7:28pm UTC](https://www.ruby-forum.com/t/idiom-wanted-do-while/50096 "2005-12-14T19:28:15Z")

</div>

So I was working on the quiz solution, and I had some code like this: b = simulate board,m while another\_turn?(b,m) b = simulate b,m end If I was doing this in C, I’d use a do-while loop instead, to avoid repeatin…

---

## [Ruby beats them all](https://www.ruby-forum.com/t/ruby-beats-them-all/50276)

<div class="topic-metadata">

**Author:** [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Replies:** 0\
**Last updated:** [December 14, 2005, 7:19pm UTC](https://www.ruby-forum.com/t/ruby-beats-them-all/50276 "2005-12-14T19:19:13Z")

</div>

that why I love ruby (and functional languages in general) def fibonacci(n) a, b = 1, 1 n.times do a, b = b, a + b end a end elegance beats ignorance (ruby vs. java)

---

## [Embed ruby in a threaded C++ Application (Mingw)](https://www.ruby-forum.com/t/embed-ruby-in-a-threaded-c-application-mingw/50272)

<div class="topic-metadata">

**Author:** [@SSSutf-8SqSFrSC3SA9](https://www.ruby-forum.com/u/SSSutf-8SqSFrSC3SA9)\
**Replies:** 0\
**Last updated:** [December 14, 2005, 6:58pm UTC](https://www.ruby-forum.com/t/embed-ruby-in-a-threaded-c-application-mingw/50272 "2005-12-14T18:58:06Z")

</div>

I’ll try to explain the current status of my application : I have a Qt4 Application which runs on Windows (thanks to Mingw). In one thread created by this application, I would like to use the Ruby 1.8.2 engine (to ev…

---

## [Freeride on Windows XP - where does the output go?](https://www.ruby-forum.com/t/freeride-on-windows-xp-where-does-the-output-go/50267)

<div class="topic-metadata">

**Author:** [@craig](https://www.ruby-forum.com/u/craig)\
**Replies:** 1\
**Last updated:** [December 14, 2005, 6:49pm UTC](https://www.ruby-forum.com/t/freeride-on-windows-xp-where-does-the-output-go/50267 "2005-12-14T18:49:04Z")

</div>

I want to use Freeride on my Win XP box, Version 2002, sp 1, but the output DOS window just flashes open and closes before I can see the output. I’m using ruby 1.8.2 (2004-12-25) \[i386-mswin32\] and Freeride version 0.…

---

## [LXR style cross references Ruby code](https://www.ruby-forum.com/t/lxr-style-cross-references-ruby-code/99404)

<div class="topic-metadata">

**Author:** [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Replies:** 3\
**Last updated:** [December 14, 2005, 6:21pm UTC](https://www.ruby-forum.com/t/lxr-style-cross-references-ruby-code/99404 "2005-12-14T18:21:53Z")

</div>

While trying to navigate a large, unfamiliar application, I find a cross referenced browser invaluable. For statically typed languages, there exist a whole bunch: LXR, the browser part of MSVC IDE, etc. For Ruby, are…

---

## [Instant Rails 1.0 preview6](https://www.ruby-forum.com/t/instant-rails-1-0-preview6/50206)

<div class="topic-metadata">

**Author:** [@curthibbs](https://www.ruby-forum.com/u/curthibbs)\
**Replies:** 3\
**Last updated:** [December 14, 2005, 5:09pm UTC](https://www.ruby-forum.com/t/instant-rails-1-0-preview6/50206 "2005-12-14T17:09:36Z")

</div>

This release upgrades Rails to version 1.0. Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all preconfigured and ready to run. No installer, you simply drop it into the …

---

## [Iconv weirdness on Windows XP](https://www.ruby-forum.com/t/iconv-weirdness-on-windows-xp/50138)

<div class="topic-metadata">

**Author:** [@Wilson\_B](https://www.ruby-forum.com/u/Wilson_B)\
**Replies:** 13\
**Last updated:** [December 14, 2005, 3:39pm UTC](https://www.ruby-forum.com/t/iconv-weirdness-on-windows-xp/50138 "2005-12-14T15:39:14Z")

</div>

Is anyone else having this problem? This is a One-Click install of Ruby, with the iconv package installed. charset.dll and iconv.dll are in c:\\windows\\system32 iconv.so is in the appropriate place deep within the Ruby…

---

## [Newer to Ruby](https://www.ruby-forum.com/t/newer-to-ruby/95829)

<div class="topic-metadata">

**Author:** [@flnative](https://www.ruby-forum.com/u/flnative)\
**Replies:** 10\
**Last updated:** [December 14, 2005, 1:11pm UTC](https://www.ruby-forum.com/t/newer-to-ruby/95829 "2005-12-14T13:11:45Z")

</div>

Hi. I am new to Ruby and new to programming altogether, but I am really trying to learn as fast as I can. So here’s my problem: I need to be able to generate a random nine digit number. The first number cannot be 9,…

---

## [Parsing literals](https://www.ruby-forum.com/t/parsing-literals/101236)

<div class="topic-metadata">

**Author:** [@akoSS](https://www.ruby-forum.com/u/akoSS)\
**Replies:** 1\
**Last updated:** [December 14, 2005, 12:14pm UTC](https://www.ruby-forum.com/t/parsing-literals/101236 "2005-12-14T12:14:31Z")

</div>

hello, i need to write a function that would parse a string literal in another language. a string literal in this language is: STRING = “CHAR\*” CHAR = any character except for " and | " | \\ | / | \\u four hexadec…

---

## [Runt: Matching the year](https://www.ruby-forum.com/t/runt-matching-the-year/50218)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 0\
**Last updated:** [December 14, 2005, 10:19am UTC](https://www.ruby-forum.com/t/runt-matching-the-year/50218 "2005-12-14T10:19:59Z")

</div>

I downloaded runt to do some temporal expression work, and was wondering if there’s any way to match against a year. From what I can tell I can match against month, day, hour, min, sec, but not the year. Basically I’…

---

## [About class methods](https://www.ruby-forum.com/t/about-class-methods/49735)

<div class="topic-metadata">

**Author:** [@hankgong](https://www.ruby-forum.com/u/hankgong)\
**Replies:** 55\
**Last updated:** [December 14, 2005, 9:40am UTC](https://www.ruby-forum.com/t/about-class-methods/49735 "2005-12-14T09:40:55Z")

</div>

Hi! When I read the Ruby manual, I noticed that for class Array, there are class methods and instance methods. Class methods: \[\] and new instance methods: too many (not list here) My question is: what’s this class…

---

## [Kalah (#58)](https://www.ruby-forum.com/t/kalah-58/97016)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 25\
**Last updated:** [December 14, 2005, 7:16am UTC](https://www.ruby-forum.com/t/kalah-58/97016 "2005-12-14T07:16:43Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [How to preserve line endings in strings with YAML?](https://www.ruby-forum.com/t/how-to-preserve-line-endings-in-strings-with-yaml/49958)

<div class="topic-metadata">

**Author:** [@twp](https://www.ruby-forum.com/u/twp)\
**Replies:** 4\
**Last updated:** [December 14, 2005, 7:04am UTC](https://www.ruby-forum.com/t/how-to-preserve-line-endings-in-strings-with-yaml/49958 "2005-12-14T07:04:43Z")

</div>

Hi all, Normally I would expect that YAML.load(x.to\_yaml) == x for all sensible values of x. However, this does not seem to be the case if the string contains certain new line characters, for example: YAML.load(“ab…

---

## [FeedTools problem](https://www.ruby-forum.com/t/feedtools-problem/50205)

<div class="topic-metadata">

**Author:** [@Kev\_J](https://www.ruby-forum.com/u/Kev_J)\
**Replies:** 0\
**Last updated:** [December 14, 2005, 4:49am UTC](https://www.ruby-forum.com/t/feedtools-problem/50205 "2005-12-14T04:49:30Z")

</div>

Hi all, I’m trying to build an rss xml file from a set of data and all I’m getting back is the raw text, instead of the expected xml. The tutorial is fairly slim and only really explains reading rather than generatin…

[Previous page](https://www.ruby-forum.com/c/ruby/7.md?page=1932)

[Next page](https://www.ruby-forum.com/c/ruby/7.md?page=1934)
