diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2015-10-12 13:28:03 +0100 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2015-10-12 13:28:03 +0100 |
commit | f39ab9f3436a498f08c14578f5ea67591150bf27 (patch) | |
tree | 6e2d219f576ba630f7081704dbe3de5621641641 /actionpack/lib/action_dispatch | |
parent | 96b1fbdeb1af9a3c843d1015a0acbdd30d26f2ff (diff) | |
parent | 218336fa54e864ae0b42c9b9cdaa7428a2f8688e (diff) | |
download | rails-f39ab9f3436a498f08c14578f5ea67591150bf27.tar.gz rails-f39ab9f3436a498f08c14578f5ea67591150bf27.tar.bz2 rails-f39ab9f3436a498f08c14578f5ea67591150bf27.zip |
Merge pull request #21849 from yui-knk/refactor_regexp_to_string
Change `Journey::Route#verb` to return string instead of regexp.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/route.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/inspector.rb | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb index f5c9abf1cc..35c2b1b86e 100644 --- a/actionpack/lib/action_dispatch/journey/route.rb +++ b/actionpack/lib/action_dispatch/journey/route.rb @@ -163,7 +163,7 @@ module ActionDispatch end def verb - %r[^#{verbs.join('|')}$] + verbs.join('|') end private diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index 48c10a7d4c..f3a5268d2e 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -16,10 +16,6 @@ module ActionDispatch app.app end - def verb - super.source.gsub(/[$^]/, '') - end - def path super.spec.to_s end |