From da2cf937aa68c2470c0d4a73c29fe3555b2667c0 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 29 May 2014 15:45:42 -0700 Subject: no more is_a checks on instantiation --- actionpack/lib/action_dispatch/journey/path/pattern.rb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'actionpack/lib/action_dispatch') 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 -- cgit v1.2.3