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

Edit distance scaling #18

Open canweriotnow opened 11 years ago

canweriotnow commented 11 years ago

Make the max Levenshtein distance a function of the length of the method name... Possibly exclude common method prefixes (like to or even each) from the calculation... At this point, excluding to_* methods (to keep RSpec working); this enhancement would replace this behaviour with edit distance scaling (with possible common prefix elimination).

This is mainly a duck typing issue... calling to_r in place of to_ary is a serious problem.