From: Daniel Berger Date: 2006-04-07T03:01:33+09:00 Subject: Crashing Fixnum#** with 64 bit Ruby Hi all, I thought this was interesting. Should Ruby handle this better? Or is this a case of, "Don't do that."? # 32 bit Ruby, Solaris 10 irb(main):001:0> (2**32).class => Bignum irb(main):002:0> (2**32) ** (2**33) (irb):2: warning: in a**b, b may be too big => Infinity ## DANGER! DANGER! WILL BRING SYSTEM TO A CRAWL! # 64 bit Ruby, Solaris 10 irb(main):002:0> (2**32).class => Fixnum irb(main):003:0> (2**32) ** (2**33) (irb):3:in `**': failed to allocate memory (NoMemoryError) from (irb):3:in `irb_binding' from /opt/test/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' from :0 The behavior is identical with or without Rational, btw. Regards, Dan