diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/path/pattern.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb index 24b90e214d..cb1a65e1f4 100644 --- a/actionpack/lib/action_dispatch/journey/path/pattern.rb +++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb @@ -5,7 +5,7 @@ module ActionDispatch attr_reader :spec, :requirements, :anchored def self.from_string string - build(string, {}, ["/.?"], true) + build(string, {}, "/.?", true) end def self.build(path, requirements, separators, anchored) @@ -17,7 +17,7 @@ module ActionDispatch def initialize(ast, requirements, separators, anchored) @spec = ast @requirements = requirements - @separators = separators.join + @separators = separators @anchored = anchored @names = nil diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index a9dae77e51..2c9cab605f 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -185,8 +185,10 @@ module ActionDispatch end private :build_conditions + JOINED_SEPARATORS = SEPARATORS.join # :nodoc: + def build_path(ast, requirements, anchor) - pattern = Journey::Path::Pattern.new(ast, requirements, SEPARATORS, anchor) + pattern = Journey::Path::Pattern.new(ast, requirements, JOINED_SEPARATORS, anchor) builder = Journey::GTG::Builder.new ast |