Skip to content

Commit

Permalink
Use reverse.find instead of select{...}.last
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Jan 22, 2024
1 parent f884363 commit 7c1934b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lrama/grammar/parameterizing_rule/resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def find(token)
end

def created_lhs(lhs_s_value)
@created_lhs_list.select { |created_lhs| created_lhs.s_value == lhs_s_value }.last
@created_lhs_list.reverse.find { |created_lhs| created_lhs.s_value == lhs_s_value }
end

private
Expand Down

0 comments on commit 7c1934b

Please sign in to comment.