Hi,
I’m trying the last version of ruby (2.0 rc2) and I have an unexpected
behavior into a project. During test with rspec an error appair and I
would understand if the problem is caused by my code or a different
behavior of ruby 2.0.
The problem is about Fixnum object: in the ruby 1.9.3 a new created
Fixnum object is not freeze but in ruby 2.0 rc2 seem to be freeze.
prove it is simple, open irb, create a fixnum object (eg. n=12345) and
call frozen? method, here are the results (I’m using rvm to manage
rubies):
ruby 1.9.3 (ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-linux])
1.9.3-p385 :001 > n=12345
=> 12345
1.9.3-p385 :002 > n.class
=> Fixnum
1.9.3-p385 :003 > n.frozen?
=> false
1.9.3-p385 :004 >