Skip to content

Commit

Permalink
Reduce allocations in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed May 18, 2023
1 parent df20c1f commit 169996f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ripper-tags/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def on_do_block(*args)
def on_method_add_block(method, body)
if method.nil?
body ? body.last : nil
elsif %w[class_eval module_eval].include?(method[2]) && body
elsif (method[2] == "class_eval" || method[2] == "module_eval") && body
[:class_eval, [
method[1].is_a?(Array) ? method[1][0] : method[1],
method[3]
Expand Down

0 comments on commit 169996f

Please sign in to comment.