tag:blogger.com,1999:blog-6594352044318880508.post3395176133349343557..comments2023-05-22T07:53:56.727-07:00Comments on Inferencing: Approximate Ruby ProgrammingUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6594352044318880508.post-56450950833563430472008-03-05T15:11:00.000-08:002008-03-05T15:11:00.000-08:00Thanks for the comments (and the code you just sen...Thanks for the comments (and the code you just sent :-) I've posted your code in a new blog post <A HREF="http://inferencing.blogspot.com/2008/03/better-approximate-ruby-programming.html" REL="nofollow">here</A>.Christian Theil Havehttps://www.blogger.com/profile/14719955451936516479noreply@blogger.comtag:blogger.com,1999:blog-6594352044318880508.post-42654901325918769052008-03-05T10:03:00.000-08:002008-03-05T10:03:00.000-08:00A few comments.When doing approximatize on an obje...A few comments.<BR/><BR/>When doing approximatize on an object the object should get a method_missing not its class. Eg:<I><BR/>t = Example.new<BR/>approximatize(t)</I><BR/><BR/>The standard alias trick is to call your method "method_missing_with_approximate", alias the old method_missing to "method_missing_without_approximate" and last alias method_missing_with_approximate to method_missing.<BR/><BR/>One way to avoid the problem with "test", "test!", "test=" and "test?" all being one distance from each other would be to simply disallow changing postfix when approximating.Anonymoushttps://www.blogger.com/profile/06858452070994209238noreply@blogger.com