alias_method :method_missing, :method_missing_with_fix_typo end end def method_missing_with_fix_typo(name, *args) if name && method = find_method(name) $stderr.puts "WARNING: execute `#{name}` as `#{method}` for #{self}" send(method, *args) else method_missing_without_fix_typo(name, *args) end end private def find_method name name.to_s.split(//).permutation.each do |candidate| _candidate = candidate.join return _candidate if respond_to?(_candidate, true) end nil end end https://gist.github.com/1870273 Έ߹ΘͤΛશνΣοΫ