From: Ryan Davis Date: 2013-02-21T02:36:24+09:00 Subject: [ruby-core:52581] Fwd: Fixnum: freeze status on ruby 2.0.0 rc2 --Apple-Mail-1644475F-BC0D-42C8-B117-6A6B0083E8ED Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Begin forwarded message: > From: Enrico Rivarola > Date: February 20, 2013, 6:59:52 PST > To: ruby-talk@ruby-lang.org (ruby-talk ML) > Subject: Fixnum: freeze status on ruby 2.0.0 rc2 > Reply-To: ruby-talk@ruby-lang.org > > 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 > > > ruby 2.0 rc2 (ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-linux]) > 2.0.0dev :001 > n=12345 > => 12345 > 2.0.0dev :002 > n.class > => Fixnum > 2.0.0dev :003 > n.frozen? > => true > 2.0.0dev :004 > > > can anyone clarify this? > > Enrico > > -- > Posted via http://www.ruby-forum.com/. > --Apple-Mail-1644475F-BC0D-42C8-B117-6A6B0083E8ED Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable



Begin forwarded message:
From: Enrico Rivarola <= lists@ruby-forum.com>
D= ate: February 20, 2013, 6:59:52 PST
To: ruby-talk@ruby-lang.org (ruby-talk ML)
Subjec= t: Fixnum: freeze status on ruby 2.0.0 rc2
Reply-To: ruby-talk@ruby-lang.org

=
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 a= nd I
would understand if the problem is caused by my code or= a different
behavior of ruby 2.0.
The probl= em is about Fixnum object: in the ruby 1.9.3 a new created
Fi= xnum object is not freeze but in ruby 2.0 rc2 seem to be freeze.
<= span>prove it is simple, open irb, create a fixnum object (eg. n=3D12345) an= d

call frozen? method, here are the results (I'm using rvm t= o manage
rubies):
ruby 1.9.3 (ruby 1.9.3p385= (2013-02-06 revision 39114) [x86_64-linux])
1.9.3-p385 :001= > n=3D12345
=3D> 12345
1.9.3-p385 :0= 02 > n.class
=3D> Fixnum
1.9.3-p385 := 003 > n.frozen?
=3D> false
1.9.3-p385= :004 >

ruby 2.0 rc2 (ruby 2.0.0dev (201= 3-02-08 trunk 39161) [x86_64-linux])
2.0.0dev :001 > n=3D= 12345
=3D> 12345
2.0.0dev :002 > n.cl= ass
=3D> Fixnum
2.0.0dev :003 > n.fro= zen?
=3D> true
2.0.0dev :004 >=

can anyone clarify this?
<= br>Enrico

--
Posted v= ia http://www.ruby-forum.com/.

= --Apple-Mail-1644475F-BC0D-42C8-B117-6A6B0083E8ED--