class Object @@golf_hash = {} def method_missing m, *a, &b t = @@golf_hash[ [m,self.class] ] ||= matching_methods(m)[0] t ? __send__(t, *a, &b) : super end def matching_methods(s='', m=callable_methods) r=/^#{s.to_s.gsub(/./){"(.*?)"+Regexp.escape($&)}}/ m.grep(r).sort_by do |i| i.to_s.match(r).captures.map(&:size)<