Skip to content

Commit

Permalink
Remove unnecessary map
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Jan 24, 2024
1 parent c7c9725 commit 5c58644
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/lrama/grammar/binding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ class Binding
def initialize(parameterizing_rule, actual_args)
@parameters = parameterizing_rule.parameters
@actual_args = actual_args
@parameter_to_arg = @parameters.zip(actual_args).map do |param, arg|
[param.s_value, arg]
end.to_h
@parameter_to_arg = @parameters.zip(actual_args).to_h { |param, arg| [param.s_value, arg] }
end

def resolve_symbol(symbol)
Expand Down

0 comments on commit 5c58644

Please sign in to comment.