From 5c586442377ebe01c564d0103a8b354dd8fb5064 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Thu, 25 Jan 2024 00:50:56 +0900 Subject: [PATCH] Remove unnecessary `map` --- lib/lrama/grammar/binding.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/lrama/grammar/binding.rb b/lib/lrama/grammar/binding.rb index e5ea3fb0..e7bdb529 100644 --- a/lib/lrama/grammar/binding.rb +++ b/lib/lrama/grammar/binding.rb @@ -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)