Skip to content

Commit

Permalink
Merge pull request #21167 from AaronLasseigne/use_each_key
Browse files Browse the repository at this point in the history
replace each with each_key when only the key is needed
  • Loading branch information
kaspth committed Aug 8, 2015
2 parents 286cb89 + 725f9bf commit 3a7609e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/routing/route_set.rb
Expand Up @@ -271,7 +271,7 @@ def handle_positional_args(controller_options, inner_options, args, result, path
path_params -= controller_options.keys
path_params -= result.keys
end
inner_options.each do |key, _|
inner_options.each_key do |key|
path_params.delete(key)
end

Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/multibyte/unicode.rb
Expand Up @@ -338,7 +338,7 @@ def load
end

# Redefine the === method so we can write shorter rules for grapheme cluster breaks
@boundary.each do |k,_|
@boundary.each_key do |k|
@boundary[k].instance_eval do
def ===(other)
detect { |i| i === other } ? true : false
Expand Down

0 comments on commit 3a7609e

Please sign in to comment.