# Ruby

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

[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:** 1645

---

## [Cyclic prob with gem\_origina\_require](https://www.ruby-forum.com/t/cyclic-prob-with-gem-origina-require/72975)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 20, 2006, 11:56am UTC](https://www.ruby-forum.com/t/cyclic-prob-with-gem-origina-require/72975 "2006-10-20T11:56:04Z")

</div>

I’d like to cure a cyclic prob with gem\_origina\_require, i get a prob with gem each time i upgrade Ruby and/or rubygems. Here is my setup : Mac OS X 10.4.8 ruby 1.8.5 (2006-08-25) \[powerpc-darwin8.8.0\] gem --version…

---

## [Etc.dir, Etc.name](https://www.ruby-forum.com/t/etc-dir-etc-name/102562)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 0\
**Last updated:** [October 20, 2006, 9:45am UTC](https://www.ruby-forum.com/t/etc-dir-etc-name/102562 "2006-10-20T09:45:21Z")

</div>

I found some of the Etc functions missing which are mentioned in Matsumoto’s book “Ruby in a nutshell”, for example Etc.dir and Etc.shell. OTOH, Etc.name exists (for example): irb(main):002:0\> Etc.dir NoMethodError: …

---

## [Newbie: Strings and RegExp](https://www.ruby-forum.com/t/newbie-strings-and-regexp/72888)

<div class="topic-metadata">

**Author:** [@diego\_v](https://www.ruby-forum.com/u/diego_v)\
**Replies:** 7\
**Last updated:** [October 20, 2006, 7:33am UTC](https://www.ruby-forum.com/t/newbie-strings-and-regexp/72888 "2006-10-20T07:33:03Z")

</div>

Hello, given an instance of String, str, how do you select/copy the section of the string between two given strings START\_STRING and END\_STRING? I used something like: re = /#{STRING\_BEFORE}(regular\_expression)#{STRI…

---

## [Re: Array#to\_s in Ruby 1.9 Head](https://www.ruby-forum.com/t/re-array-to-s-in-ruby-1-9-head/72934)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 8\
**Last updated:** [October 20, 2006, 6:46am UTC](https://www.ruby-forum.com/t/re-array-to-s-in-ruby-1-9-head/72934 "2006-10-20T06:46:45Z")

</div>

From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] Mauricio F. writes in eigenclass.org +Ruby+1.9+update+5 that Ruby 1.9 Head has changed Array#to\_s to be an alias for Array#to\_…

---

## [Storing a Hash in a database table using YAML--anything bett](https://www.ruby-forum.com/t/storing-a-hash-in-a-database-table-using-yaml-anything-bett/72952)

<div class="topic-metadata">

**Author:** [@JSBSRainsberger](https://www.ruby-forum.com/u/JSBSRainsberger)\
**Replies:** 3\
**Last updated:** [October 20, 2006, 6:24am UTC](https://www.ruby-forum.com/t/storing-a-hash-in-a-database-table-using-yaml-anything-bett/72952 "2006-10-20T06:24:41Z")

</div>

I’m a beginning Rails programmer, so please be gentle. I want to store a hash as a single row in a database table. I’m currently storing each name/value pair as a row with a reference back to the “parent” row, but tha…

---

## [Challenge: correctly handling Accept-Language HTTP header](https://www.ruby-forum.com/t/challenge-correctly-handling-accept-language-http-header/72928)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [October 20, 2006, 2:52am UTC](https://www.ruby-forum.com/t/challenge-correctly-handling-accept-language-http-header/72928 "2006-10-20T02:52:18Z")

</div>

I’ve been pondering the best way of writing a piece of code that will, when given a list of language options, select the one that best fullfills what is being requested in an Accept-Language header. i.e. If one has …

---

## [Gtk: Writing a CellRenderer in Ruby](https://www.ruby-forum.com/t/gtk-writing-a-cellrenderer-in-ruby/72432)

<div class="topic-metadata">

**Author:** [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Replies:** 1\
**Last updated:** [October 20, 2006, 2:26am UTC](https://www.ruby-forum.com/t/gtk-writing-a-cellrenderer-in-ruby/72432 "2006-10-20T02:26:15Z")

</div>

(Repost from the ruby-gnome2 developers list, where there seems to be no-one home) Folk, I’ve subclassed the CellRendererPixbuf to make a renderer that has a “state” property that displays an appropriate icon for eac…

---

## [RSS/Atom feed consuming lib?](https://www.ruby-forum.com/t/rss-atom-feed-consuming-lib/72585)

<div class="topic-metadata">

**Author:** [@pazu](https://www.ruby-forum.com/u/pazu)\
**Replies:** 8\
**Last updated:** [October 20, 2006, 2:00am UTC](https://www.ruby-forum.com/t/rss-atom-feed-consuming-lib/72585 "2006-10-20T02:00:10Z")

</div>

I have a customer (we build their intranet with Rails) that subscribes to a number of news feeds. They want to make these feeds available on their intranet so we need to fetch, parse and publish these feeds (like a in…

---

## [RubyConf ticket for sale](https://www.ruby-forum.com/t/rubyconf-ticket-for-sale/72517)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 4\
**Last updated:** [October 20, 2006, 1:32am UTC](https://www.ruby-forum.com/t/rubyconf-ticket-for-sale/72517 "2006-10-20T01:32:06Z")

</div>

I have a RubyConf ticket, food included, for sale. $200 (what I paid) Note: the food plan is vegetarian, so you may have to eat healthy. :slight\_smile: (Experience tells me that there are usually extras of whatever is…

---

## [How to print/write the result to a file](https://www.ruby-forum.com/t/how-to-print-write-the-result-to-a-file/72949)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 1\
**Last updated:** [October 20, 2006, 1:32am UTC](https://www.ruby-forum.com/t/how-to-print-write-the-result-to-a-file/72949 "2006-10-20T01:32:06Z")

</div>

Hi folks, Assume I have an array=\[1,2,3\] How do I print/write the result to a file called test.text either in the same folder or in a different folder? Thanks in advance, Li

---

## [Re: Why Class decls and API docs don't Match](https://www.ruby-forum.com/t/re-why-class-decls-and-api-docs-dont-match/72798)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 8\
**Last updated:** [October 20, 2006, 1:26am UTC](https://www.ruby-forum.com/t/re-why-class-decls-and-api-docs-dont-match/72798 "2006-10-20T01:26:02Z")

</div>

From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] Anybody who’s done any Ruby on Rails will have seen, edited, or constructed the following which is suggestive of a general Ruby …

---

## [Re: Why Class decls and API docs don't Match](https://www.ruby-forum.com/t/re-why-class-decls-and-api-docs-dont-match/72950)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 20, 2006, 1:22am UTC](https://www.ruby-forum.com/t/re-why-class-decls-and-api-docs-dont-match/72950 "2006-10-20T01:22:02Z")

</div>

From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] If RDoc ran the code it parsed, then it would open a security hole a mile wide, as I could then run arbitrary code on the machi…

---

## [Gsub $B$G(B taint $B$K$J$k(B](https://www.ruby-forum.com/t/gsub-b-g-b-taint-b-k-j-k-b/72833)

<div class="topic-metadata">

**Author:** [@SSSBSHS\_SSSSS5SRSmS](https://www.ruby-forum.com/u/SSSBSHS_SSSSS5SRSmS)\
**Replies:** 5\
**Last updated:** [October 20, 2006, 12:39am UTC](https://www.ruby-forum.com/t/gsub-b-g-b-taint-b-k-j-k-b/72833 "2006-10-20T00:39:57Z")

</div>

e$B$H$\_$?$G$9!#e(B 1.8.5 e$B$G!"e(Buntaint e$B$7$?J8;zNs$KBP$7$Fe(B gsub e$B$9$k$He(B taint e$B$K$J$C$F$7$^$$e(B e$B$^$9!#e(B hoge = “abcdefg” hoge.taint hoge =~ /\[a-z\]/ hoge.untaint p hoge.tainted? # =\> false …

---

## [Non-directory, non-file "files"](https://www.ruby-forum.com/t/non-directory-non-file-files/72895)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 4\
**Last updated:** [October 20, 2006, 12:01am UTC](https://www.ruby-forum.com/t/non-directory-non-file-files/72895 "2006-10-20T00:01:53Z")

</div>

If they’re not directories, and they’re not files, then what the heck are they? C:\\Documents and Settings\\gavin.kistner\>ruby -rfind -e “Find.find(’.’){|x| p(x) unless File.directory?(x) or File.file?(x) }” “./Local S…

---

## [Registered for RubyConf - Unable to Go](https://www.ruby-forum.com/t/registered-for-rubyconf-unable-to-go/72924)

<div class="topic-metadata">

**Author:** [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 11:07pm UTC](https://www.ruby-forum.com/t/registered-for-rubyconf-unable-to-go/72924 "2006-10-19T23:07:41Z")

</div>

Here’s the e-mail I just wrote to David Black. Anyone with anything to add, please e-mail me at removed\_email\_address@domain.invalid David, I am registered for RubyConf, but I have just found out that I am unable t…

---

## [My second day of learning Ruby (and my seconds feels)](https://www.ruby-forum.com/t/my-second-day-of-learning-ruby-and-my-seconds-feels/72851)

<div class="topic-metadata">

**Author:** [@florent\_g](https://www.ruby-forum.com/u/florent_g)\
**Replies:** 6\
**Last updated:** [October 19, 2006, 10:51pm UTC](https://www.ruby-forum.com/t/my-second-day-of-learning-ruby-and-my-seconds-feels/72851 "2006-10-19T22:51:38Z")

</div>

Hi all, Thanks for your anwers yesterday. Are you ready for my next day of learning Ruby? :wink: First impressions of ranges: let’s try ranges as sequences: irb(main):271:0\> (0…2).each { |bb| puts bb } 0 1 2 =\> 0…

---

## [Detecting data type](https://www.ruby-forum.com/t/detecting-data-type/72865)

<div class="topic-metadata">

**Author:** [@parvg](https://www.ruby-forum.com/u/parvg)\
**Replies:** 4\
**Last updated:** [October 19, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/detecting-data-type/72865 "2006-10-19T22:07:15Z")

</div>

hello all, i’m new to ruby and need some help on what seems like a simple issue. How do i find out if the argument passed to a method is a string or an integer? Here’s what i’m trying to do: def method\_test(some\_arg…

---

## [Re: Why Class decls and API docs don't Match](https://www.ruby-forum.com/t/re-why-class-decls-and-api-docs-dont-match/72917)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 10:03pm UTC](https://www.ruby-forum.com/t/re-why-class-decls-and-api-docs-dont-match/72917 "2006-10-19T22:03:14Z")

</div>

From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] As such, Ruby designers might have more carefully considered how’d they expect programmers to understand Ruby libraries for that…

---

## [Leaving to RubyConf](https://www.ruby-forum.com/t/leaving-to-rubyconf/72405)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 8\
**Last updated:** [October 19, 2006, 9:51pm UTC](https://www.ruby-forum.com/t/leaving-to-rubyconf/72405 "2006-10-19T21:51:11Z")

</div>

Hi folks, I am going to leave home to the RubyConf (how far it is from my home). After visiting Utah, I will arrive at the Denver airport at 19:21 on Thursday. See you there. matz.

---

## [WxSugar 0.1.2 released](https://www.ruby-forum.com/t/wxsugar-0-1-2-released/72909)

<div class="topic-metadata">

**Author:** [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Replies:** 2\
**Last updated:** [October 19, 2006, 9:20pm UTC](https://www.ruby-forum.com/t/wxsugar-0-1-2-released/72909 "2006-10-19T21:20:24Z")

</div>

WxSugar is a set of syntax extensions to sweeten up the WxRuby GUI library. == INSTALLATION == WxSugar is available to download from Rubyforge: http://rubyforge.org/frs/?group\_id=35 Or as a gem: gem install wxsugar …

---

## [IRB Console in RDT/Eclipse](https://www.ruby-forum.com/t/irb-console-in-rdt-eclipse/70638)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [October 19, 2006, 8:28pm UTC](https://www.ruby-forum.com/t/irb-console-in-rdt-eclipse/70638 "2006-10-19T20:28:23Z")

</div>

Is there a way to open an irb console in Eclipse? I am sure there is but I can’t seem to find it on the menu. Frank

---

## [Re: newbie: Strings and RegExp](https://www.ruby-forum.com/t/re-newbie-strings-and-regexp/72907)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 8:13pm UTC](https://www.ruby-forum.com/t/re-newbie-strings-and-regexp/72907 "2006-10-19T20:13:43Z")

</div>

From: Diego V. \[mailto:removed\_email\_address@domain.invalid\] However here you are using /mo instead of /m. What does the extra o mean? And where can I read more about this topic? I’ve checked on the Pragmatic Program…

---

## [Test/spec 0.2, a BDD interface for Test::Unit](https://www.ruby-forum.com/t/test-spec-0-2-a-bdd-interface-for-test-unit/72761)

<div class="topic-metadata">

**Author:** [@cneuhaus](https://www.ruby-forum.com/u/cneuhaus)\
**Replies:** 2\
**Last updated:** [October 19, 2006, 7:09pm UTC](https://www.ruby-forum.com/t/test-spec-0-2-a-bdd-interface-for-test-unit/72761 "2006-10-19T19:09:33Z")

</div>

Hello, today I’m releasing test/spec 0.2, a library to do BDD with Test::Unit. (See below for changes in version 0.2.) == What is test/spec? test/spec layers an RSpec-inspired interface on top of Test::Unit, so you …

---

## [Rtags, function extraction how to use?](https://www.ruby-forum.com/t/rtags-function-extraction-how-to-use/72872)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 1\
**Last updated:** [October 19, 2006, 6:45pm UTC](https://www.ruby-forum.com/t/rtags-function-extraction-how-to-use/72872 "2006-10-19T18:45:29Z")

</div>

Hey all, Kinda new to ruby programming and I was wondering if anyone could tell me how to use rtags for function extraction from .c,.h, and .cpp files. Any help would be appreciated.

---

## [Re: Non-directory, non-file "files"](https://www.ruby-forum.com/t/re-non-directory-non-file-files/72897)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 6:25pm UTC](https://www.ruby-forum.com/t/re-non-directory-non-file-files/72897 "2006-10-19T18:25:02Z")

</div>

irb(main):010:0\> File.file? ‘/dev/cdrom’ =\> false irb(main):011:0\> File.directory? ‘/dev/cdrom’ =\> false irb(main):012:0\> File.blockdev? ‘/dev/cdrom’ =\> true Ah ha, good to know. The Windows files I’m finding al…

---

## [\- New leadership for ruby-spreadsheet](https://www.ruby-forum.com/t/new-leadership-for-ruby-spreadsheet/62276)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 6\
**Last updated:** [October 19, 2006, 6:19pm UTC](https://www.ruby-forum.com/t/new-leadership-for-ruby-spreadsheet/62276 "2006-10-19T18:19:01Z")

</div>

Hi all, I’m looking for someone to take over the lead role for the “spreadsheet” package. I just don’t have the vested interest in this library that I once had, and so I figure it’s time to turn it over to someone wh…

---

## [Jruby Tutorial](https://www.ruby-forum.com/t/jruby-tutorial/72883)

<div class="topic-metadata">

**Author:** [@CameronS\_Gemma\_SUK](https://www.ruby-forum.com/u/CameronS_Gemma_SUK)\
**Replies:** 0\
**Last updated:** [October 19, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/jruby-tutorial/72883 "2006-10-19T17:34:56Z")

</div>

Just in case you weren’t already aware and may find this useful/intersting. Ta Gem This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended …

---

## [Performance of ruby hashes](https://www.ruby-forum.com/t/performance-of-ruby-hashes/72721)

<div class="topic-metadata">

**Author:** [@unni.tallman](https://www.ruby-forum.com/u/unni.tallman)\
**Replies:** 12\
**Last updated:** [October 19, 2006, 5:26pm UTC](https://www.ruby-forum.com/t/performance-of-ruby-hashes/72721 "2006-10-19T17:26:41Z")

</div>

Anyway to enhance the performance of ruby hashes? My program uses hashes heavily. So if i could enhance hash performance, or find a fasster alternative to hashes, i could improve the overall performance of my program.…

---

## [Why does the eql? method exist?](https://www.ruby-forum.com/t/why-does-the-eql-method-exist/72832)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 2\
**Last updated:** [October 19, 2006, 4:37pm UTC](https://www.ruby-forum.com/t/why-does-the-eql-method-exist/72832 "2006-10-19T16:37:54Z")

</div>

Not too long ago, there was a thread about a bug in Ruby where vectors (which turned out to be derived from matrices) failed to work as hash keys. The problem turned out to be a typo in the definition of the Matrix c…

---

## [Iterator inside string](https://www.ruby-forum.com/t/iterator-inside-string/72869)

<div class="topic-metadata">

**Author:** [@akbarhome](https://www.ruby-forum.com/u/akbarhome)\
**Replies:** 3\
**Last updated:** [October 19, 2006, 3:42pm UTC](https://www.ruby-forum.com/t/iterator-inside-string/72869 "2006-10-19T15:42:50Z")

</div>

Hi, This is the code: a = \[ ‘a’, ‘b’ \] b = 2 stringbla = “home #{ a.each {|i| i \* b } } work” puts stringbla output: home ab work How do I modifiy the iterator so the output will be: home aabb work Thank you.

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

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