diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-29 15:45:42 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-29 15:45:42 -0700 |
commit | da2cf937aa68c2470c0d4a73c29fe3555b2667c0 (patch) | |
tree | 6fd83631fce62e70477025c30593b808e84df429 /actionpack/lib/action_dispatch/journey | |
parent | bb207ea7b6df6101860d5de6e47ad0e0f1ea2cdf (diff) | |
download | rails-da2cf937aa68c2470c0d4a73c29fe3555b2667c0.tar.gz rails-da2cf937aa68c2470c0d4a73c29fe3555b2667c0.tar.bz2 rails-da2cf937aa68c2470c0d4a73c29fe3555b2667c0.zip |
no more is_a checks on instantiation
Diffstat (limited to 'actionpack/lib/action_dispatch/journey')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/path/pattern.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb index c39f8e850a..3af940a02f 100644 --- a/actionpack/lib/action_dispatch/journey/path/pattern.rb +++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb @@ -11,15 +11,10 @@ module ActionDispatch end def initialize(strexp) - case strexp - when Router::Strexp - @spec = strexp.ast - @requirements = strexp.requirements - @separators = strexp.separators.join - @anchored = strexp.anchor - else - raise ArgumentError, "Bad expression: #{strexp}" - end + @spec = strexp.ast + @requirements = strexp.requirements + @separators = strexp.separators.join + @anchored = strexp.anchor @names = nil @optional_names = nil |