From: "Bartosz Dziewoński" Date: 2012-04-16T02:53:32+09:00 Subject: Re: Why doesn't Fixnum#to_d exist? W dniu 15 kwietnia 2012 19:48 użytkownik Chad Perrin napisał: > Thanks.  That's the method I was trying to remember, but it wouldn't come > to me. > > It's pretty strange how this works, though: > >    >> Integer.methods.include? :to_d >    => false >    >> 1.method(:to_d).owner >    => Integer > > . . . so, because I was using the Integer.methods.include? approach > earlier, I didn't find it in Integer either.  Shouldn't the class report > the method when asked even if it's added by a mixin or straight-up > monkeypatch? irb(main):007:0> require 'bigdecimal/util' => true irb(main):011:0> Integer.instance_methods.grep /to_d/ => [:to_d] -- Matma Rex