rename lambda references to use shorthand syntax
This commit is contained in:
@@ -19,7 +19,7 @@ class WikiPagePresenter
|
||||
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(CGI.escape_html(q)) }
|
||||
|
||||
Reference in New Issue
Block a user