# Ruby

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

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

---

## [TDD in coding!](https://www.ruby-forum.com/t/tdd-in-coding/137068)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/tdd-in-coding/137068 "2008-05-08T18:25:45Z")

</div>

Are we developing the code in TDD style with CI? Currently all the methods I have added, I have a seperate ruby code which runs test against to verify my results. I would like to know are we adding the tests build int…

---

## [Write to broken pipe on Linux](https://www.ruby-forum.com/t/write-to-broken-pipe-on-linux/136404)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 7\
**Last updated:** [May 8, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/write-to-broken-pipe-on-linux/136404 "2008-05-08T18:12:15Z")

</div>

e$B$J$+$@$G$9!#e(B http://rryu.sakura.ne.jp/nisenise-fuhito/2008/04/22/950.html e$B$He(B e$B$+e(B(e$B8+Mn$H$7$F$^$7$?$,e(B)\[ruby-list:43356\]e$B$K$“$k!”@\\B3$,@Z$l$?%=%1%Ce(B e$B%H$K=q$-9~$b$&$H$9$k$H!"FsEYL\\0J9\_e(Bsele…

---

## [Integers with preceding zero don't return as expected?](https://www.ruby-forum.com/t/integers-with-preceding-zero-dont-return-as-expected/137062)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 4\
**Last updated:** [May 8, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/integers-with-preceding-zero-dont-return-as-expected/137062 "2008-05-08T17:29:03Z")

</div>

09:02:40 ~ $ irb 07023 =\> 3603 Thoughts? Huh? -R

---

## [Generic and non generic type with the same name](https://www.ruby-forum.com/t/generic-and-non-generic-type-with-the-same-name/137048)

<div class="topic-metadata">

**Author:** [@stenzer](https://www.ruby-forum.com/u/stenzer)\
**Replies:** 4\
**Last updated:** [May 8, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/generic-and-non-generic-type-with-the-same-name/137048 "2008-05-08T17:24:53Z")

</div>

IronRuby seems to be having a problem resolving a generic type when a non generic type with the same name exists. The specific example that I discovered the bug with is when trying to using Moq \[1\]. describe “some c…

---

## [Idiom for Hash like map](https://www.ruby-forum.com/t/idiom-for-hash-like-map/136928)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 5\
**Last updated:** [May 8, 2008, 5:18pm UTC](https://www.ruby-forum.com/t/idiom-for-hash-like-map/136928 "2008-05-08T17:18:24Z")

</div>

class Fruit attr\_accessor :name, :price def initialize(args) @name = args\[:name\] @price = args\[:price\] end end array = \[ Fruit.new(:name =\> “apple”, :price =\> 2), Fruit.new(:name =\> “grape”, :price =\> 20), Fruit…

---

## [Changing hash key](https://www.ruby-forum.com/t/changing-hash-key/136933)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 5\
**Last updated:** [May 8, 2008, 4:58pm UTC](https://www.ruby-forum.com/t/changing-hash-key/136933 "2008-05-08T16:58:16Z")

</div>

I am working with a script to record accounts and their balances. I need to check the key in a hash and if the account number is already there just add the blanace to the value. So far this is what I have and its not…

---

## [Rcov segmentation faults on Debian and Ubuntu (not on OS X)](https://www.ruby-forum.com/t/rcov-segmentation-faults-on-debian-and-ubuntu-not-on-os-x/136983)

<div class="topic-metadata">

**Author:** [@stephen](https://www.ruby-forum.com/u/stephen)\
**Replies:** 6\
**Last updated:** [May 8, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/rcov-segmentation-faults-on-debian-and-ubuntu-not-on-os-x/136983 "2008-05-08T16:39:13Z")

</div>

This has been driving me nuts and I’ve spent too much time on it. I’m running rcov under cruisecontrol.rb on OS X just fine. Both my slices at slicehost fail to do so and report seemingly random segmentation faults an…

---

## [Initial stages of scripting](https://www.ruby-forum.com/t/initial-stages-of-scripting/137024)

<div class="topic-metadata">

**Author:** [@Hayden\_Smith](https://www.ruby-forum.com/u/Hayden_Smith)\
**Replies:** 8\
**Last updated:** [May 8, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/initial-stages-of-scripting/137024 "2008-05-08T16:08:27Z")

</div>

Hi there, I’m a relative newbie when it comes to scripting in ruby however, for a year 11 project at school, it is necesary for me to program a maths utilit which requests a user - elementary school aged - to add to …

---

## [Download file with mirrors](https://www.ruby-forum.com/t/download-file-with-mirrors/137051)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 4:03pm UTC](https://www.ruby-forum.com/t/download-file-with-mirrors/137051 "2008-05-08T16:03:23Z")

</div>

Hi, I think to download a file is a simple task but I would like to know how with NET::HTTP or maybe some other library I can download a file using mirrors. I.e. I want to specify how many times I want to break the fi…

---

## [To check for numericality](https://www.ruby-forum.com/t/to-check-for-numericality/137011)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 11\
**Last updated:** [May 8, 2008, 3:59pm UTC](https://www.ruby-forum.com/t/to-check-for-numericality/137011 "2008-05-08T15:59:34Z")

</div>

Hi I have @val=SomeValue #for example 00,02,aa How can I check @val contains only numeriacal(including zero) values…I have to avoid aa above (for example ) Sijo

---

## [In order to cross platform, Ruby is designed to be interpreted in runtime, so Ruby code is exposed](https://www.ruby-forum.com/t/in-order-to-cross-platform-ruby-is-designed-to-be-interpreted-in-runtime-so-ruby-code-is-exposed/136762)

<div class="topic-metadata">

**Author:** [@Erwin\_M](https://www.ruby-forum.com/u/Erwin_M)\
**Replies:** 9\
**Last updated:** [May 8, 2008, 3:07pm UTC](https://www.ruby-forum.com/t/in-order-to-cross-platform-ruby-is-designed-to-be-interpreted-in-runtime-so-ruby-code-is-exposed/136762 "2008-05-08T15:07:45Z")

</div>

How about PHP? I think the same problem with PHP.

---

## [Any reason why this code should not work - The Ruby Way, p270](https://www.ruby-forum.com/t/any-reason-why-this-code-should-not-work-the-ruby-way-p270/137035)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 6\
**Last updated:** [May 8, 2008, 2:44pm UTC](https://www.ruby-forum.com/t/any-reason-why-this-code-should-not-work-the-ruby-way-p270/137035 "2008-05-08T14:44:42Z")

</div>

I lifted the following code from The Ruby way and tried to use it. It does not output anything. Do anyone knows why? Thank you Victor ############################## This code adds a count method to the Array class T…

---

## [Code Review: RubyScopeDebugView](https://www.ruby-forum.com/t/code-review-rubyscopedebugview/136771)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/code-review-rubyscopedebugview/136771 "2008-05-08T14:43:32Z")

</div>

Ironruby-core mailing list removed\_email\_address@domain.invalid http://rubyforge.org/mailman/listinfo/ironruby-core

---

## [0x40000000 | 1.0](https://www.ruby-forum.com/t/0x40000000-1-0/137018)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 11:01am UTC](https://www.ruby-forum.com/t/0x40000000-1-0/137018 "2008-05-08T11:01:03Z")

</div>

e$B0J2\<$N$h$&$K!"e(Bbignum e$B$He(B float e$B$N%S%C%H1i;;$,2DG=$J$N$O8=:\_$?e(B e$B$V$s0U?^$5$l$F$$$J$$$H;W$$$^$9!#e(B % ./ruby -ve ‘p 0x40000000 | 1.0’ ruby 1.9.0 (2008-05-08 revision 16334) \[i686-linux\] 1073741825

---

## [Where to put code for extending a class?](https://www.ruby-forum.com/t/where-to-put-code-for-extending-a-class/136859)

<div class="topic-metadata">

**Author:** [@zoopzoop](https://www.ruby-forum.com/u/zoopzoop)\
**Replies:** 30\
**Last updated:** [May 8, 2008, 10:09am UTC](https://www.ruby-forum.com/t/where-to-put-code-for-extending-a-class/136859 "2008-05-08T10:09:11Z")

</div>

I want to extend the String class with a capitalize\_each\_word method (http://donttrustthisguy.com/2005/12/31/ruby-extending-classes-and-method-chaining/) What is the recommended place to put the code?

---

## [compile\_prelude.rb$B$G%(%i!\<(B](https://www.ruby-forum.com/t/compile-prelude-rb-b-g-i-b/137004)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 8:39am UTC](https://www.ruby-forum.com/t/compile-prelude-rb-b-g-i-b/137004 "2008-05-08T08:39:20Z")

</div>

e$B$k$S$-$A$G$9!#e(B compile\_prelude.rbe$B$Ne(Brequiree$B$,%$%s%9%H!\<%kHGe(Berbe$B$r;H$&$;$$$G%(%i!\<$K$J$C$F$7$^$$$^$9!#e(B ./miniruby -I./lib -I. -rrbconfig ./tool/compile\_prelude.rb ./prelude.rb ./enc/prelude.rb .…

---

## [How to get to the beginning in irb](https://www.ruby-forum.com/t/how-to-get-to-the-beginning-in-irb/137008)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [May 8, 2008, 7:52am UTC](https://www.ruby-forum.com/t/how-to-get-to-the-beginning-in-irb/137008 "2008-05-08T07:52:56Z")

</div>

I am using OSX. I am using terminal and I use irb. After typing something I need to do p at the front. Now I need to go back to the beginning of the line and I hit left arrow key and it takes forever. I have seen peop…

---

## [Ruby in HTML](https://www.ruby-forum.com/t/ruby-in-html/136884)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 3\
**Last updated:** [May 8, 2008, 7:13am UTC](https://www.ruby-forum.com/t/ruby-in-html/136884 "2008-05-08T07:13:08Z")

</div>

Hello, I’ve been googling this, but with no concrete answers… Ruby 186-26 is installed on my system - I was wondering if I could use Ruby in HTML files that are just on my local machine. Thus far I’ve been unsuccessf…

---

## [Precedence of single-line rescue and assignment](https://www.ruby-forum.com/t/precedence-of-single-line-rescue-and-assignment/136967)

<div class="topic-metadata">

**Author:** [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Replies:** 9\
**Last updated:** [May 8, 2008, 6:40am UTC](https://www.ruby-forum.com/t/precedence-of-single-line-rescue-and-assignment/136967 "2008-05-08T06:40:59Z")

</div>

def boom raise “boom” end y = “” y = boom rescue “fine” puts y # “fine” So far so good; the precedence of “rescue” is higher than that of assignment. But now: def boom raise “boom” end y = “” y += boom rescue…

---

## [Ruby Gems ERROR: could not find rush locally or in a repository](https://www.ruby-forum.com/t/ruby-gems-error-could-not-find-rush-locally-or-in-a-repository/137000)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 2:51am UTC](https://www.ruby-forum.com/t/ruby-gems-error-could-not-find-rush-locally-or-in-a-repository/137000 "2008-05-08T02:51:08Z")

</div>

I am on Leopard and when I do sudo gem install rush I get the above error message. Suddenly something is messed up with the Ruby Gems. I tried to follow Chad F.'s suggestion on mailing list archive (2004). I reinstall…

---

## [Erubis 2.6.0 released - a fast and extensible eRuby](https://www.ruby-forum.com/t/erubis-2-6-0-released-a-fast-and-extensible-eruby/136689)

<div class="topic-metadata">

**Author:** [@makoto\_kuwata](https://www.ruby-forum.com/u/makoto_kuwata)\
**Replies:** 2\
**Last updated:** [May 8, 2008, 1:35am UTC](https://www.ruby-forum.com/t/erubis-2-6-0-released-a-fast-and-extensible-eruby/136689 "2008-05-08T01:35:41Z")

</div>

I have released Erubis 2.6.0. http://www.kuwata-lab.com/erubis/ http://www.kuwata-lab.com/erubis/support/ Erubis is another eRuby implementation which is very fast and extensible than ERB and eruby. Enhancements fro…

---

## [Code for connecting to SQL Server?](https://www.ruby-forum.com/t/code-for-connecting-to-sql-server/136927)

<div class="topic-metadata">

**Author:** [@anukulsinghal](https://www.ruby-forum.com/u/anukulsinghal)\
**Replies:** 7\
**Last updated:** [May 8, 2008, 1:15am UTC](https://www.ruby-forum.com/t/code-for-connecting-to-sql-server/136927 "2008-05-08T01:15:48Z")

</div>

Hi, I want to connect to my SQL Server DB through ruby code. Searched on the connection and was provided some steps like: Save the latest source distribution of ruby-dbi and copy the file ADO.rb to X:/ruby/lib/rub…

---

## [FasterCSV](https://www.ruby-forum.com/t/fastercsv/136989)

<div class="topic-metadata">

**Author:** [@krisw](https://www.ruby-forum.com/u/krisw)\
**Replies:** 2\
**Last updated:** [May 8, 2008, 12:42am UTC](https://www.ruby-forum.com/t/fastercsv/136989 "2008-05-08T00:42:46Z")

</div>

I am wanting to use faster\_csv to read two csv files and append columns to the first from the second and write to a temp file. for example, 1st Csv … id,name\_first,name\_last,email\\n 1,Dave,Wilson,removed\_email\_addr…

---

## [Rawr 0.3.1 Released](https://www.ruby-forum.com/t/rawr-0-3-1-released/136994)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 12:37am UTC](https://www.ruby-forum.com/t/rawr-0-3-1-released/136994 "2008-05-08T00:37:10Z")

</div>

Rawr 0.3.1 has been released. Rawr gives you a packaging and deployment system for your JRuby application. Rawr can package your app into an executable jar and provides you integration with existing Java IDE’s. http:…

---

## [Flexmock not working in cygwin](https://www.ruby-forum.com/t/flexmock-not-working-in-cygwin/136900)

<div class="topic-metadata">

**Author:** [@pood](https://www.ruby-forum.com/u/pood)\
**Replies:** 2\
**Last updated:** [May 8, 2008, 12:20am UTC](https://www.ruby-forum.com/t/flexmock-not-working-in-cygwin/136900 "2008-05-08T00:20:01Z")

</div>

I get an no such file to load error when i try to run my unit test with: require ‘flexmock/test\_unit’ I’ve tried require ‘…flexmock/test\_unit’ What do I need to do to fix this? the flexmock gem installed fine.

---

## [Welcome Curt to the IronPython team](https://www.ruby-forum.com/t/welcome-curt-to-the-ironpython-team/136987)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 11:54pm UTC](https://www.ruby-forum.com/t/welcome-curt-to-the-ironpython-team/136987 "2008-05-07T23:54:54Z")

</div>

That was subtle indeed. So to fix that, I am pleased to welcome Curt to the IronPython team. Curt has been active in both the IronPython and IronRuby mailing lists, and we are excited to have him officially be working…

---

## [Hash adding values](https://www.ruby-forum.com/t/hash-adding-values/136968)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 17\
**Last updated:** [May 7, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/hash-adding-values/136968 "2008-05-07T22:44:17Z")

</div>

I’m trying to insert account numbers into a hash and add the balances together that are stored in the value. Is there a reason this is not working? sktylist = Hash.new("") sktylist\[@acctnum\] += \[value\] p sktylist

---

## [Build problems (mono, gmcs from svn)](https://www.ruby-forum.com/t/build-problems-mono-gmcs-from-svn/136833)

<div class="topic-metadata">

**Author:** [@C.JSAdams-Collier](https://www.ruby-forum.com/u/C.JSAdams-Collier)\
**Replies:** 3\
**Last updated:** [May 7, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/build-problems-mono-gmcs-from-svn/136833 "2008-05-07T22:14:16Z")

</div>

Hey all, I’m not familiar with ruby or rake, so please forgive the n00b question. Is IronRuby known to currently build on mono 1.9? ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type T' must be a ref…

---

## [1 Registration for RailsConf](https://www.ruby-forum.com/t/1-registration-for-railsconf/136974)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/1-registration-for-railsconf/136974 "2008-05-07T21:35:57Z")

</div>

I registered for O’Reilly RailsConf, but I can’t make it, so I’m looking to sell my ticket. This ticket includes Thursday, the tutorial day and these 2 classes: Thursday Morning Tutorials: Hands-on Rapid Rails Develop…

---

## [Get method in Array subclass: where's it defined?](https://www.ruby-forum.com/t/get-method-in-array-subclass-wheres-it-defined/136862)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 9\
**Last updated:** [May 7, 2008, 8:46pm UTC](https://www.ruby-forum.com/t/get-method-in-array-subclass-wheres-it-defined/136862 "2008-05-07T20:46:13Z")

</div>

Hi, Daniel F. in another tread help me define a Matrix of essentially arbitrary dimension as a subclass of Array. He employs a “get” method to handle a splat of the subscripts. I can’t figure out where this get me…

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

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