From: Just Another Victim of the Ambient Morality Date: 2007-12-05T14:40:02+09:00 Subject: Re: I consider this a bug in Ruby... "botp" wrote in message news:c39f93e00712042008h64b633ebj3413fc8b9dc7410b@mail.gmail.com... > On Dec 5, 2007 7:40 AM, Just Another Victim of the Ambient Morality > wrote: >> RangeError: bignum too big to convert into 'long' > > possible bug. bignum is really too big for long :) > >> Why is there any "converting" to do? How can this not work? > > range is expensive. > try numeric step, > > irb(main):010:0> r=1_000_000_000_000 > => 1000000000000 > irb(main):011:0> r.step(r*10,r){|x| p x} > 1000000000000 > 2000000000000 > 3000000000000 > 4000000000000 > 5000000000000 > 6000000000000 > 7000000000000 > 8000000000000 > 9000000000000 > 10000000000000 > => 1000000000000 > irb(main):012:0> In what way is Range expensive? Why is it so expensive? Thank you...