From: "T. Onoma" Date: 2003-12-15T09:55:04+09:00 Subject: Re: All there is to know about Duck Typing (was: inplace assignment) On Monday 15 December 2003 01:31 am, Derek Lewis wrote: > This sounds like some "fun" code I was writing the other day, just for the > heck of it. I wrote a module I called CloseCall, and it defined > method_missing. It searches all the methods on the object with the same > (or compatible) arity, and uses the String#fuzzy_match method from the > code snippets on rubyforge to find a method with a similar name. When it > finds one similar enough, it uses class_eval to define the method, so > method_missing doesn't get called the next time. > > I can post the code if there's any interest, but it's not terribly pretty, > as it was more of an experiment than anything. :) I would certainly enjoy seeing it. How much have you tried it out? T.