From: Rick DeNatale Date: 2008-05-04T04:23:41+09:00 Subject: Re: Why there is not "replace" method for Fixnum? On Sat, May 3, 2008 at 3:01 PM, Iñaki Baz Castillo wrote: > El Sábado, 3 de Mayo de 2008, Gerardo Santana Gómez Garrido escribió: > > > > I hope explanations like this would appear in some Ruby manual and so :) > > > > What about the Fixnum class documentation: > > > > http://www.ruby-doc.org/core/classes/Fixnum.html > > > > "Fixnum objects have immediate value. This means that when they are > > assigned or passed as parameters, the actual object is passed, rather > > than a reference to that object. Assignment does not alias Fixnum > > objects. There is effectively only one Fixnum object instance for any > > given integer value, so, for example, you cannot add a singleton > > method to a Fixnum." > > Yes, you are completely right :) > > But anyway, I think no newbie will read the doc of a integer since probably a > newbie will no realize of the class nature of a integer in Ruby, completely > different of any other language. > That's wahy I suggested to explain all this stuf in a Ruby manual instead of > core doc. Most of the popular expositions of Ruby ("Programming Ruby" a.k.a. the pickaxe, "Ruby for Rails", "The Ruby Programming language", e.g.) do explain this. Blogs are also a good source, may I have the temerity to suggest a couple of articles germane to Ruby objects and variables: http://talklikeaduck.denhaven2.com/articles/2006/09/13/on-variables-values-and-objects http://talklikeaduck.denhaven2.com/articles/2008/02/08/whose-variable-is-it-anyway -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/