From gdelfino at umich.edu Mon Dec 31 12:37:54 2007 From: gdelfino at umich.edu (Gustavo Delfino) Date: Mon, 31 Dec 2007 13:37:54 -0400 Subject: [rand] Conflict with Rails 2.0? Message-ID: Hello. I have Rand 0.9.1 installed. I used it with Rails 1.2 but now it seems to fail with Rails 2.0. I suspect that it could be related to the fact that Rails 2.0 includes a new rand method: Example without Rails: $ irb >> require 'rand' => true >> [1,2,3,4,5].shuffle => [2, 3, 4, 5, 1] >> exit Example with Rails: $ ./script/console Loading development environment (Rails 2.0.2) >> require 'rand' => [] >> [1,2,3,4,5].shuffle ArgumentError: wrong number of arguments (1 for 0) from /Library/Ruby/Site/1.8/rand.rb:103:in `rand' from /Library/Ruby/Site/1.8/rand.rb:103:in `shuffle!' from /Library/Ruby/Site/1.8/rand.rb:102:in `downto' from /Library/Ruby/Site/1.8/rand.rb:102:in `shuffle!' from /Library/Ruby/Site/1.8/rand.rb:93:in `shuffle' from (irb):2 >> [1,2,3,4,5].rand => 4 >> exit Regards, Gustavo Delfino -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2470 bytes Desc: not available Url : http://rubyforge.org/pipermail/rand-users/attachments/20071231/adb64aa0/attachment.bin