ruby-jokes / close_enough

Spelling is hrad. close_enough lets yuo think about code instaed.
http://ruby-jokes.github.com/close_enough
GNU General Public License v3.0
84 stars 10 forks source link

Ensure method lookup propagates all the way up object graph before close_enough gets involved #13

Closed canweriotnow closed 11 years ago

canweriotnow commented 11 years ago

Object#method_missing is invoking nearest-method lookup too soon and borking inheritance in some cases... this may be fixed by #10 but I should double check. Current issue:

[16:37][~/code/close_enough(master)]$ irb -r./lib/close_enough
[CloseEnough] to_int not found, using to_i instead
1.9.3p194 :001 > String.new.send(:to_ary)
[CloseEnough] to_ary not found, using to_a instead
[CloseEnough] to_ary not found, using to_a instead
[CloseEnough] to_ary not found, using to_r instead
 => (0/1) 
1.9.3p194 :002 > String.new.send(:to_a)
[CloseEnough] to_ary not found, using to_a instead
[CloseEnough] to_ary not found, using to_a instead
[CloseEnough] to_a not found, using to_i instead
 => 0 

Looks like the inherited-classes jiggery-pokery with method_missing is being messed with...

canweriotnow commented 11 years ago

Also, pry is completely borked by close_enough at the moment.

canweriotnow commented 11 years ago

Fixed by #15 - closing