Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
if @seen.has_key?("#cybot_test") corrections = @seen["#cybot_test"].keys.inject({}) do |hash, name| distance = edit_distance(nick, name).to_f hash[name] = distance if distance <= (nick.size + name.size.to_f) / 2.0 * 0.70 hash end.sort_by { |e| e[1] } corrected_nick = corrections.first.first end
This paste will be private.
From the Design Piracy series on my blog: