diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-08-15 02:04:11 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-08-15 02:04:11 +0000 |
commit | 7678d123a7e46edcf418a6959b615e2387b7fad6 (patch) | |
tree | 864240d0f3056efe1aec7b2a752dbe0c1853c05a /actionpack/lib/action_controller | |
parent | 5baf7462c7a6dc6b30eec2b03735fee15e5b0dca (diff) | |
download | rails-7678d123a7e46edcf418a6959b615e2387b7fad6.tar.gz rails-7678d123a7e46edcf418a6959b615e2387b7fad6.tar.bz2 rails-7678d123a7e46edcf418a6959b615e2387b7fad6.zip |
Relax Routing's anchor pattern warning; it was preventing use of [^/] inside restrictions.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4763 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 8c85c712a0..7b9bbc3b5a 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -681,7 +681,7 @@ module ActionController segment = segment_named[key] if segment raise TypeError, "#{key}: requirements on a path segment must be regular expressions" unless requirement.is_a?(Regexp) - if requirement.source =~ %r{\\A|\\Z|\\z|\^|\$} + if requirement.source =~ %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z} raise ArgumentError, "Regexp anchor characters are not allowed in routing requirements: #{requirement.inspect}" end segment.regexp = requirement |