On Fri, Apr 15, 2011 at 12:37 AM, Yukihiro Matsumoto <matz / ruby-lang.org> wrote: > Hi, > > In message "Re: [ruby-core:35767] Re: [Ruby 1.8 - Bug #4578] Fixnum.freeze not frozen?" > on Fri, 15 Apr 2011 14:31:53 +0900, Magnus Holm <judofyr / gmail.com> writes: > > |Isn't technically all Fixnums "frozen" (because you can't modify the state)? > > Not really, since fixnums could have instance variables. > > Thus, theoretically, there's room for freezing fixnums. I don't think > it's worth the cost though. I guess you mean the cost in MRI. In JRuby, Fixnums *could* be frozen (we don't enable it to match MRI), but the same value is not guaranteed to be the same object throughout the system. Tradeoffs! - Charlie