Permalink
Browse files

Fix hash modification during iteration in Mapper [#5420]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information...
1 parent 47f6d8b commit b4a520874a84c8364308f73bcad5833a63854835 @nicksieger nicksieger committed with spastorino Aug 20, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -774,7 +774,7 @@ def apply_common_behavior_for(method, resources, options, &block)
return true
end
- options.each do |k,v|
+ options.keys.each do |k|
(options[:constraints] ||= {})[k] = options.delete(k) if options[k].is_a?(Regexp)
end

0 comments on commit b4a5208

Please sign in to comment.