From: John W Higgins Date: 2013-03-18T15:39:40+09:00 Subject: Re: confusion with singleton method call --20cf307f37f4be8c3c04d82d4099 Content-Type: text/plain; charset=ISO-8859-1 That nasty thing google again - it always amazes me why they put descriptions of errors sometimes. "can't define singleton ruby" You're welcome as usual John On Sun, Mar 17, 2013 at 10:43 PM, Love U Ruby wrote: > D. Deryl Downey wrote in post #1102022: > > > > > Dude, if you're going to try complex stuff like this, use your friggin > > head. You keep attempting to do dumb ass stuff, but don't have a clue to > > what you're doing. You're not thinking, nor even attempting to reason it > > out. It didn't dawn on you that NUMBERS are different than their base > > class? What good would defining a singleton on the number 11 do? > > NOTHING! > > I don't know how much you understand my above question,which is so > valid. > > From the doc: http://www.ruby-doc.org/core-2.0/Fixnum.html > > Clearly mentioned that - ***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.** > > The same I agreed for Bignum,FLoat and Symbol. > > Now the `true`,`false` and `nil` also has fixed Object_id, But why they > are allowed to have singleton class on them. -- This is my curiosity to > know and I think which is to legitimate. > > Thanks. > > -- > Posted via http://www.ruby-forum.com/. > > --20cf307f37f4be8c3c04d82d4099 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable That nasty thing google again - it always amazes me why they put descriptio= ns of errors sometimes.

"can't define singleton ruby"<= br>
You're welcome as usual

John

On Sun, Mar 17, 2013 at 10:43 PM, Love U Ruby <lists@ruby-forum.com> wrote:
D. Deryl Downey wrote in post #1102022:

>
> Dude, if you're going to try complex stuff like this, use your fri= ggin
> head. You keep attempting to do dumb ass stuff, but don't have a c= lue to
> what you're doing. You're not thinking, nor even attempting to= reason it
> out. It didn't dawn on you that NUMBERS are different than their b= ase
> class? What good would defining a singleton on the number 11 do?
> NOTHING!

I don't know how much you understand my above question,which is s= o
valid.

From the doc: http://www.ruby-doc.org/core-2.0/Fixnum.html

Clearly mentioned that - ***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.**

The same I agreed for Bignum,FLoat and Symbol.

Now the `true`,`false` and `nil` also has fixed Object_id, But why they
are allowed to have singleton class on them. -- This is my curiosity to
know and I think which is to legitimate.

Thanks.

--20cf307f37f4be8c3c04d82d4099--