From: Marc-Andre Lafortune Date: 2013-02-21T03:13:38+09:00 Subject: [ruby-core:52584] Re: Fwd: Fixnum: freeze status on ruby 2.0.0 rc2 --047d7b2e0c7d954e8b04d62bea60 Content-Type: text/plain; charset=ISO-8859-1 Indeed, Fixnums (and Bignums) are now frozen in 2.0.0, see http://bugs.ruby-lang.org/issues/3222 I added that to the incompatibility list in the NEWS (r39340). On Wed, Feb 20, 2013 at 12:36 PM, Ryan Davis wrote: > > > > 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/. > > --047d7b2e0c7d954e8b04d62bea60 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Indeed, Fixnums (and Bignums) are now frozen in 2.0.0, see= =A0http://bugs.ruby-lang.= org/issues/3222

I added that to the incom= patibility list in the NEWS (r39340).

On Wed, Feb 20, 2= 013 at 12:36 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:



Begin forwarded message:

From: Enrico Rivarola <lists@ruby-forum.com>
Date: Feb= ruary 20, 2013, 6:59:52 PST
To: rub= y-talk@ruby-lang.org (ruby-talk ML)
Subject: Fixnum: freez= e status on ruby 2.0.0 rc2
Reply-To: ruby-talk@ruby-lang.org

Hi,
<= span>I'm trying the last version of ruby (2.0 rc2) and I have an unexpe= cted
behavior into a project. During test with rspec an err= or 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 F= ixnum 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=3D12345) = and
call frozen? method, here are the results (I'm usin= g 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=3D12345
=3D> 12345<= br>1.9.3-p385 :002 > n.class
=3D> Fixnum
1.9.3-p385 :003 > n.frozen?
=3D> false
1.9.3-p385 :004 >

ruby 2.0 rc2 (r= uby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-linux])
2.0.0= dev :001 > n=3D12345
=3D> 12345
2.0.= 0dev :002 > n.class
=3D> Fixnum
2.0.0dev :003 > n.frozen? =3D> true
2.0.0dev :004 >

can anyone clarify this?

En= rico

--
Posted via http://www.ruby-forum.com/.<= br>

--047d7b2e0c7d954e8b04d62bea60--