# Ruby

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

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

---

## [If you're seeing this through ruby-forum.com, please read](https://www.ruby-forum.com/t/if-youre-seeing-this-through-ruby-forum-com-please-read/172588)

<div class="topic-metadata">

**Author:** [@dotty](https://www.ruby-forum.com/u/dotty)\
**Replies:** 0\
**Last updated:** [July 23, 2009, 5:28pm UTC](https://www.ruby-forum.com/t/if-youre-seeing-this-through-ruby-forum-com-please-read/172588 "2009-07-23T17:28:48Z")

</div>

This may be a non-issue by the time you read this, but currently (as of 07/23/2009), mailing-list items (questions and responses) do NOT (appear to) show up in the forum. You may be better served looking through the m…

---

## [Bug Rounding Floats? (9.245 \* 100).round =\> 924? S/B 925!](https://www.ruby-forum.com/t/bug-rounding-floats-9-245-100-round-924-s-b-925/172520)

<div class="topic-metadata">

**Author:** [@ddoherty03](https://www.ruby-forum.com/u/ddoherty03)\
**Replies:** 7\
**Last updated:** [July 23, 2009, 5:00pm UTC](https://www.ruby-forum.com/t/bug-rounding-floats-9-245-100-round-924-s-b-925/172520 "2009-07-23T17:00:30Z")

</div>

All, Would someone try the below unit test and explain why ruby does not pass. It came up while I was trying to write a generalized rounding method for floats that takes the number of place to round to as a paramete…

---

## [Problem with Heckle](https://www.ruby-forum.com/t/problem-with-heckle/172583)

<div class="topic-metadata">

**Author:** [@m4lloc](https://www.ruby-forum.com/u/m4lloc)\
**Replies:** 0\
**Last updated:** [July 23, 2009, 3:52pm UTC](https://www.ruby-forum.com/t/problem-with-heckle/172583 "2009-07-23T15:52:27Z")

</div>

Hi When I use heckle with some classes I got this error message: heckle Greeter /usr/local/lib/ruby/gems/1.8/gems/heckle-1.4.2/bin/…/lib/heckle.rb:10:in const\_get': uninitialized constant Greeter (NameError) from /us…

---

## [Replacing verticle white spaces?](https://www.ruby-forum.com/t/replacing-verticle-white-spaces/172247)

<div class="topic-metadata">

**Author:** [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Replies:** 5\
**Last updated:** [July 23, 2009, 3:36pm UTC](https://www.ruby-forum.com/t/replacing-verticle-white-spaces/172247 "2009-07-23T15:36:51Z")

</div>

Any ideas on how to replace a verticle white space? for example tetetetetetetete tetetettetetetete rererererererere rerererererererr such that you end up with tetetetetetetettete etetetetetetetetete rererererere…

---

## [Why I get an empty hash?](https://www.ruby-forum.com/t/why-i-get-an-empty-hash/172476)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 11\
**Last updated:** [July 23, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/why-i-get-an-empty-hash/172476 "2009-07-23T15:07:34Z")

</div>

Hi all, I modify James’ code and want to return a hash with all values set to 0. But I only get an empty hash. I wonder what is wrong with my codes. Thanks, Li def table(array,word\_size=1,word=’’) hash\_table=Hash.n…

---

## [Do you program in any other language except for ruby?](https://www.ruby-forum.com/t/do-you-program-in-any-other-language-except-for-ruby/172351)

<div class="topic-metadata">

**Author:** [@milandobrota](https://www.ruby-forum.com/u/milandobrota)\
**Replies:** 27\
**Last updated:** [July 23, 2009, 2:25pm UTC](https://www.ruby-forum.com/t/do-you-program-in-any-other-language-except-for-ruby/172351 "2009-07-23T14:25:31Z")

</div>

And what are they? :slight\_smile:

---

## [How to control timeout exceptions](https://www.ruby-forum.com/t/how-to-control-timeout-exceptions/172566)

<div class="topic-metadata">

**Author:** [@junaid](https://www.ruby-forum.com/u/junaid)\
**Replies:** 1\
**Last updated:** [July 23, 2009, 1:49pm UTC](https://www.ruby-forum.com/t/how-to-control-timeout-exceptions/172566 "2009-07-23T13:49:50Z")

</div>

This is code that i am using for fetching updates from twitter. I used SystemTimer gem from thoughtwork(http://ph7spot.com/articles/system\_timer) to ensure that we don’t get anymore timeout exception and crashed page.…

---

## [Ruby "star".... what's it?](https://www.ruby-forum.com/t/ruby-star-whats-it/172560)

<div class="topic-metadata">

**Author:** [@Mirko\_Viviani](https://www.ruby-forum.com/u/Mirko_Viviani)\
**Replies:** 11\
**Last updated:** [July 23, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/ruby-star-whats-it/172560 "2009-07-23T12:57:13Z")

</div>

Hi everybody. What means this snippet of code? Why use the “star” ? myarray = \[1,2,3,4,5,6,6\] qa = \*myarray Thank you.

---

## [String spliting and inclusion](https://www.ruby-forum.com/t/string-spliting-and-inclusion/172446)

<div class="topic-metadata">

**Author:** [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Replies:** 16\
**Last updated:** [July 23, 2009, 11:19am UTC](https://www.ruby-forum.com/t/string-spliting-and-inclusion/172446 "2009-07-23T11:19:00Z")

</div>

Hi all, I am having trouble working out some logic for my problem. I basically have a long string (320 characters) and I want to split into smaller strings no longer than 50 characters in length. At present I have the …

---

## [Ext/tk/extconf.rb creates a file in $srcdir](https://www.ruby-forum.com/t/ext-tk-extconf-rb-creates-a-file-in-srcdir/172426)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 3\
**Last updated:** [July 23, 2009, 9:23am UTC](https://www.ruby-forum.com/t/ext-tk-extconf-rb-creates-a-file-in-srcdir/172426 "2009-07-23T09:23:15Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B e$B$U$H5$$E$$$?$N$G$9$,!"e(Bext/tk/extconf.rbe$B$,e(B$srcdire$B$Ke(Bconfig\_list e$B$r:n$C$F$$$^$9$M!#e(B $srcdire$B$K$O$h$\[$I$N$3$H$,$J$$8B$j=q$-9~$s$GM\_$7$/$J$$$o$1$G$…

---

## [Initial release of bond - custom autocompletion for the console](https://www.ruby-forum.com/t/initial-release-of-bond-custom-autocompletion-for-the-console/172554)

<div class="topic-metadata">

**Author:** [@ghorner](https://www.ruby-forum.com/u/ghorner)\
**Replies:** 0\
**Last updated:** [July 23, 2009, 9:06am UTC](https://www.ruby-forum.com/t/initial-release-of-bond-custom-autocompletion-for-the-console/172554 "2009-07-23T09:06:18Z")

</div>

Hi, I’m announcing the initial release of bond, a gem to make custom autocompletion easy for irb and readline-like environments. It provides a dsl for argument autocompletion of methods as well as method autocompleti…

---

## [Searching/Comparison of CSV then importing into database](https://www.ruby-forum.com/t/searching-comparison-of-csv-then-importing-into-database/172523)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 2\
**Last updated:** [July 23, 2009, 8:58am UTC](https://www.ruby-forum.com/t/searching-comparison-of-csv-then-importing-into-database/172523 "2009-07-23T08:58:09Z")

</div>

Hello all, I’m a newbie to Ruby. I’m really a PHP guy with around 2 weeks (department mandated) of Ruby experience. Production Platform: Windows 2003 Ruby version: 1.8.6 My project consists of reading one CSV and i…

---

## [Openssl Upgrade Producing "Cipher is not a class (TypeError"](https://www.ruby-forum.com/t/openssl-upgrade-producing-cipher-is-not-a-class-typeerror/172484)

<div class="topic-metadata">

**Author:** [@lfeistel](https://www.ruby-forum.com/u/lfeistel)\
**Replies:** 2\
**Last updated:** [July 23, 2009, 5:36am UTC](https://www.ruby-forum.com/t/openssl-upgrade-producing-cipher-is-not-a-class-typeerror/172484 "2009-07-23T05:36:29Z")

</div>

Hi guys, I am having a really annoying problem trying to start my webrick server. It has got to do with the openssl bindings for ruby. I recently performed an upgrade of the following packages: libopenssl-ruby1.8 (1.…

---

## [Question about text parsing](https://www.ruby-forum.com/t/question-about-text-parsing/172533)

<div class="topic-metadata">

**Author:** [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Replies:** 7\
**Last updated:** [July 23, 2009, 3:51am UTC](https://www.ruby-forum.com/t/question-about-text-parsing/172533 "2009-07-23T03:51:22Z")

</div>

Hello, I am new to ruby and had a question about parsing text. I am trying to parse out the first IP address from a string. I have a working solution, but it seems like a rather round about way to do it. This is my c…

---

## [A Noob question about gtk](https://www.ruby-forum.com/t/a-noob-question-about-gtk/172529)

<div class="topic-metadata">

**Author:** [@jjrussell](https://www.ruby-forum.com/u/jjrussell)\
**Replies:** 0\
**Last updated:** [July 22, 2009, 11:46pm UTC](https://www.ruby-forum.com/t/a-noob-question-about-gtk/172529 "2009-07-22T23:46:03Z")

</div>

im putting a few buttons inside of a gtk::alignment, but i can figure how to put them in, i know that im supposed to do something like “add\_child(builder, child, type)” but what do i put for the builder?? sorry if i s…

---

## [Uninitialized constant XmlEngine::Logger (NameError)](https://www.ruby-forum.com/t/uninitialized-constant-xmlengine-logger-nameerror/172522)

<div class="topic-metadata">

**Author:** [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Replies:** 5\
**Last updated:** [July 22, 2009, 11:36pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-xmlengine-logger-nameerror/172522 "2009-07-22T23:36:45Z")

</div>

Hi I am trying to include the log4r gem but the interpreter doesn’t seem to find it it keeps throwing my the following error C:\\Users\\venkat\\Documents\\Projects\\RuBravo\\RubravoCore\\lib\\XmlEngine\>ruby -d XmlEngine.rb …

---

## [Instantiating classes / sharing data between classes](https://www.ruby-forum.com/t/instantiating-classes-sharing-data-between-classes/172513)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 11\
**Last updated:** [July 22, 2009, 11:21pm UTC](https://www.ruby-forum.com/t/instantiating-classes-sharing-data-between-classes/172513 "2009-07-22T23:21:52Z")

</div>

I think this is what I want to do (maybe I’m thinking about it wrong): a = Doctor.new b = Doctor.new I want both ‘a’ and ‘b’ to have access to: modalities = \[‘US’, ‘CR’, ‘CT’, ‘MR’\] The array ‘modalities’ is not har…

---

## [Safe move/copy with incrementing filenames?](https://www.ruby-forum.com/t/safe-move-copy-with-incrementing-filenames/172413)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 3\
**Last updated:** [July 22, 2009, 10:12pm UTC](https://www.ruby-forum.com/t/safe-move-copy-with-incrementing-filenames/172413 "2009-07-22T22:12:58Z")

</div>

So, I’m working on some DAM (digital asset management) scripts, and I want to make sure that I don’t overwrite any files when I move or copy them. I was about to start working on a move method that would add a number …

---

## [Gem versions and Gem lists different after update](https://www.ruby-forum.com/t/gem-versions-and-gem-lists-different-after-update/172497)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 1\
**Last updated:** [July 22, 2009, 9:43pm UTC](https://www.ruby-forum.com/t/gem-versions-and-gem-lists-different-after-update/172497 "2009-07-22T21:43:41Z")

</div>

For awhile now I’ve not had any issues with using any of the gem commands. Everything was working fine. Yesterday, I updated to rubygems 1.3.5 and right after doing so, when I perform a gem list it only sees rubygems…

---

## [Incorrect -0.0.hash - Ruby bug](https://www.ruby-forum.com/t/incorrect-0-0-hash-ruby-bug/172514)

<div class="topic-metadata">

**Author:** [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Replies:** 5\
**Last updated:** [July 22, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/incorrect-0-0-hash-ruby-bug/172514 "2009-07-22T19:25:44Z")

</div>

Hello. I just found a bug in Ruby, version 1.9.1p0, Windows. In the rdoc to Object#hash we read (class Object - RDoc Documentation): “This function must have the property that a.eql?(b) implies a.hash == b.hash.” No…

---

## [Timer examples](https://www.ruby-forum.com/t/timer-examples/172467)

<div class="topic-metadata">

**Author:** [@Mathspeedy](https://www.ruby-forum.com/u/Mathspeedy)\
**Replies:** 3\
**Last updated:** [July 22, 2009, 6:56pm UTC](https://www.ruby-forum.com/t/timer-examples/172467 "2009-07-22T18:56:28Z")

</div>

Hi ! I think the title says it all, I would like to see some timer examples, just for fun =D

---

## [Building Ruby From Source?](https://www.ruby-forum.com/t/building-ruby-from-source/172250)

<div class="topic-metadata">

**Author:** [@azzoti](https://www.ruby-forum.com/u/azzoti)\
**Replies:** 6\
**Last updated:** [July 22, 2009, 4:07pm UTC](https://www.ruby-forum.com/t/building-ruby-from-source/172250 "2009-07-22T16:07:57Z")

</div>

I am new to Ruby, but fairly used to Linux. I was wondering if those developing on Linux compile ruby, gems, and any other libs you may use from source, or do you use the premade packages provided by your distro? Just …

---

## [Parsing XML in Ruby](https://www.ruby-forum.com/t/parsing-xml-in-ruby/172439)

<div class="topic-metadata">

**Author:** [@b1gtuna](https://www.ruby-forum.com/u/b1gtuna)\
**Replies:** 11\
**Last updated:** [July 22, 2009, 2:38pm UTC](https://www.ruby-forum.com/t/parsing-xml-in-ruby/172439 "2009-07-22T14:38:45Z")

</div>

Hi! I’m new in this forum, so i’m be very gratefull, you won’t be angry if I ask some stupid question. My today work is: “Parsing XML in Ruby”, XML is in attachment. I’ve never done it, so please help me:) thanks Ad…

---

## [Another TCPSocket Question](https://www.ruby-forum.com/t/another-tcpsocket-question/172436)

<div class="topic-metadata">

**Author:** [@snow-templar](https://www.ruby-forum.com/u/snow-templar)\
**Replies:** 9\
**Last updated:** [July 22, 2009, 12:32pm UTC](https://www.ruby-forum.com/t/another-tcpsocket-question/172436 "2009-07-22T12:32:42Z")

</div>

Sorry to bother you guys about this again. So my main problem right now is probably due to my lack of knowledge of the TCPSocket, even with the documentation. I mean, all the methods I have read about either require …

---

## [How to share irb session?](https://www.ruby-forum.com/t/how-to-share-irb-session/172490)

<div class="topic-metadata">

**Author:** [@arun](https://www.ruby-forum.com/u/arun)\
**Replies:** 5\
**Last updated:** [July 22, 2009, 12:32pm UTC](https://www.ruby-forum.com/t/how-to-share-irb-session/172490 "2009-07-22T12:32:31Z")

</div>

I am trying to teach my students ruby and rails online, so that they can contribute to the software we are writing for mentally challenged kids at skid.org.in I would love to be able to type something into an irb sess…

---

## [Default parameter values for methods in Ruby 1.9](https://www.ruby-forum.com/t/default-parameter-values-for-methods-in-ruby-1-9/172465)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 5\
**Last updated:** [July 22, 2009, 12:28pm UTC](https://www.ruby-forum.com/t/default-parameter-values-for-methods-in-ruby-1-9/172465 "2009-07-22T12:28:24Z")

</div>

Hi, I expected that the following is valid in Ruby 1.9: def get\_element(auid, document=nil, selector, check\_etag=true) \[…\] end However I get an error: syntax error, unexpected ‘=’, expecting ‘)’ (SyntaxError) …, el…

---

## [Bug in HTTPClient (shouldn't look for body in 304 response)](https://www.ruby-forum.com/t/bug-in-httpclient-shouldnt-look-for-body-in-304-response/172452)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 3\
**Last updated:** [July 22, 2009, 11:50am UTC](https://www.ruby-forum.com/t/bug-in-httpclient-shouldnt-look-for-body-in-304-response/172452 "2009-07-22T11:50:34Z")

</div>

Hi, I’ve detected a bug in HTTPClient when receiving a 304 with no Content-Length. According to RFC 2616: 4.4 Message Length The transfer-length of a message is the length of the message-body as it appears in the m…

---

## [Create a variable number of loop](https://www.ruby-forum.com/t/create-a-variable-number-of-loop/172418)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 6\
**Last updated:** [July 22, 2009, 11:45am UTC](https://www.ruby-forum.com/t/create-a-variable-number-of-loop/172418 "2009-07-22T11:45:53Z")

</div>

Hi all, I want to create a variable number of loop based on the input: if the input is 1, I will create a loop ( I call it 1-loop); if the input is 2 , I will create a nested loop( 2-loop); if the input is 3, I will …

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/172485)

<div class="topic-metadata">

**Author:** [@andre\_hartawan](https://www.ruby-forum.com/u/andre_hartawan)\
**Replies:** 0\
**Last updated:** [July 22, 2009, 8:00am UTC](https://www.ruby-forum.com/t/no-subject/172485 "2009-07-22T08:00:49Z")

</div>

unsubscribe

---

## [Rubyforge 1.0.4 Released](https://www.ruby-forum.com/t/rubyforge-1-0-4-released/172480)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [July 22, 2009, 5:30am UTC](https://www.ruby-forum.com/t/rubyforge-1-0-4-released/172480 "2009-07-22T05:30:02Z")

</div>

rubyforge version 1.0.4 has been released! http://codeforpeople.rubyforge.org/rubyforge/ http://rubyforge.org/projects/codeforpeople/ A script which automates a limited set of rubyforge operations. Run ‘rubyforge he…

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

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