diff options
author | Petri Avikainen <petri.avikainen@gmail.com> | 2019-02-05 14:13:38 +0200 |
---|---|---|
committer | Petri Avikainen <petri.avikainen@gmail.com> | 2019-02-05 14:13:38 +0200 |
commit | 1315582b374f33becfb325bf339674a0a5e6d141 (patch) | |
tree | 49377c5ca63785760544e6d52c5e85cdf32e07e5 /actionpack/lib/action_dispatch | |
parent | c94754e2f0bc488907157382ece309baf4ddb1b0 (diff) | |
download | rails-1315582b374f33becfb325bf339674a0a5e6d141.tar.gz rails-1315582b374f33becfb325bf339674a0a5e6d141.tar.bz2 rails-1315582b374f33becfb325bf339674a0a5e6d141.zip |
Restrict matching with word boundary or end of string
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/path/pattern.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb index 6924dc92c2..697f5b9d8b 100644 --- a/actionpack/lib/action_dispatch/journey/path/pattern.rb +++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb @@ -119,7 +119,7 @@ module ActionDispatch class UnanchoredRegexp < AnchoredRegexp # :nodoc: def accept(node) - %r{\A#{visit node}\b} + %r{\A#{visit node}(?:\b|\Z)} end end |