diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-28 03:58:01 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-28 03:58:01 +0000 |
commit | 0c0610d398a89f5a74c9fee593eee1bb10975a46 (patch) | |
tree | 5fa4e4e6658a29baabc0669b338f36c424d9660a /actionpack/lib/action_controller | |
parent | 57c613a6013b351c41a74f986edfbb8bab12691b (diff) | |
download | rails-0c0610d398a89f5a74c9fee593eee1bb10975a46.tar.gz rails-0c0610d398a89f5a74c9fee593eee1bb10975a46.tar.bz2 rails-0c0610d398a89f5a74c9fee593eee1bb10975a46.zip |
Use extract_options! rather than Hash test + pop. Closes #10628 [ssoroka]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index edd4683f60..8260a7b04c 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -1216,7 +1216,7 @@ module ActionController opts = if args.empty? || Hash === args.first args.first || {} else - options = args.last.is_a?(Hash) ? args.pop : {} + options = args.extract_options! args = args.zip(#{route.segment_keys.inspect}).inject({}) do |h, (v, k)| h[k] = v h |