rename lambda references to use shorthand syntax
This commit is contained in:
@@ -14,7 +14,7 @@ module WikiPageVersionsHelper
|
||||
cbo = Diff::LCS::ContextDiffCallbacks.new
|
||||
diffs = thisarr.diff(otharr, cbo)
|
||||
|
||||
escape_html = lambda {|str| str.gsub(/&/,'&').gsub(/</,'<').gsub(/>/,'>')}
|
||||
escape_html = ->(str) {str.gsub(/&/,'&').gsub(/</,'<').gsub(/>/,'>')}
|
||||
|
||||
output = thisarr
|
||||
output.each { |q| q.replace(escape_html[q]) }
|
||||
|
||||
Reference in New Issue
Block a user