diff options
author | Agis Anastasopoulos <corestudiosinc@gmail.com> | 2013-04-08 22:13:13 +0300 |
---|---|---|
committer | Agis Anastasopoulos <corestudiosinc@gmail.com> | 2013-04-08 22:52:32 +0300 |
commit | a779ea9d57b00bd3b59f5546603271c2d302247c (patch) | |
tree | aa6e31799b7c3cd17db03652fdb802c322c0dfd9 /actionpack/lib/action_dispatch/routing | |
parent | e2e9eed3dc6205ec0f9925a8c452067fae9a552d (diff) | |
download | rails-a779ea9d57b00bd3b59f5546603271c2d302247c.tar.gz rails-a779ea9d57b00bd3b59f5546603271c2d302247c.tar.bz2 rails-a779ea9d57b00bd3b59f5546603271c2d302247c.zip |
Mark unused variables and make some style fixes
It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 8c095d605a..80054c8a40 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -489,7 +489,7 @@ module ActionDispatch end options = app - app, path = options.find { |k, v| k.respond_to?(:call) } + app, path = options.find { |k, _| k.respond_to?(:call) } options.delete(app) if app end @@ -1361,7 +1361,7 @@ module ActionDispatch def match(path, *rest) if rest.empty? && Hash === path options = path - path, to = options.find { |name, value| name.is_a?(String) } + path, to = options.find { |name, _value| name.is_a?(String) } options[:to] = to options.delete(path) paths = [path] diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 07203428d4..d48a83e6c6 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -665,7 +665,7 @@ module ActionDispatch end req = @request_class.new(env) - @router.recognize(req) do |route, matches, params| + @router.recognize(req) do |route, _matches, params| params.merge!(extras) params.each do |key, value| if value.is_a?(String) |