From: Josh Cheek Date: 2012-04-15T05:35:12+09:00 Subject: Re: Why doesn't Fixnum#to_d exist? --f46d04448035c87fca04bda98245 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Apr 14, 2012 at 11:45 AM, Chad Perrin wrote: > On Sat, Apr 14, 2012 at 07:23:34AM +0900, Mark Campbell wrote: > > Yes, that file has the String#to_d, Float#to_d and Rational#to_d. > > Fixnum#to_d is not present. > > Strange. It appears you're right. I can do 1.to_d, but I don't know > what class has the method when I use it like that. > > -- > Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] > > You can ask the method for its owner to find out 1.method(:to_d).owner # => Integer --f46d04448035c87fca04bda98245 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sat, Apr 14, 2012 at 11:45 AM, Chad Perrin <code@apotheon.net> wrote:
On Sat, Apr 14, 2012 at 07:23:34AM +0900, Mark Campbell w= rote:
> Yes, that file has the String#to_d, Float#to_d and Rational#to_d.
> Fixnum#to_d is not present.

Strange. =A0It appears you're right. =A0I can do 1.to_d, but I do= n't know
what class has the method when I use it like that.

--
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


You can ask the method for = its owner to find out
1.method(:to_d).owner #=A0=3D> Intege= r=A0
--f46d04448035c87fca04bda98245--