diff options
author | yui-knk <spiketeika@gmail.com> | 2015-10-03 18:28:29 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2015-10-03 18:28:29 +0900 |
commit | 218336fa54e864ae0b42c9b9cdaa7428a2f8688e (patch) | |
tree | c1a01b20325e18c4265b085ecd7b05e95dfaaf4a /actionpack/lib | |
parent | 37423e4ff883ad5584bab983aceb4b2b759a1fd8 (diff) | |
download | rails-218336fa54e864ae0b42c9b9cdaa7428a2f8688e.tar.gz rails-218336fa54e864ae0b42c9b9cdaa7428a2f8688e.tar.bz2 rails-218336fa54e864ae0b42c9b9cdaa7428a2f8688e.zip |
Change `Journey::Route#verb` to return string instead of regexp.
By [this commit](https://github.com/rails/rails/commit/0b476de445faf330c58255e2ec3eea0f3a7c1bfc)
`Journey::Route#verb` need not to return verb as regexp.
The returned value is used by inspector, so change it to be a string.
Add inspect_with_multiple_verbs test case to keep the behavior of
inspector correctly.
Diffstat (limited to 'actionpack/lib')
-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 |