aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey
diff options
context:
space:
mode:
authorfatkodima <fatkodima123@gmail.com>2018-02-17 01:26:36 +0200
committerfatkodima <fatkodima123@gmail.com>2018-02-17 02:44:58 +0200
commit94a27cb2b5c9b3db8e72d4cbef00ff040b30681d (patch)
treecb5252da38c5918e6aaf7fcba5219e838a3d13df /actionpack/lib/action_dispatch/journey
parent89bcca59e91fa9da941de890012872e8288e77b0 (diff)
downloadrails-94a27cb2b5c9b3db8e72d4cbef00ff040b30681d.tar.gz
rails-94a27cb2b5c9b3db8e72d4cbef00ff040b30681d.tar.bz2
rails-94a27cb2b5c9b3db8e72d4cbef00ff040b30681d.zip
Fix array routing constraints
Diffstat (limited to 'actionpack/lib/action_dispatch/journey')
-rw-r--r--actionpack/lib/action_dispatch/journey/path/pattern.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb
index 2d85a89a56..537f479ee5 100644
--- a/actionpack/lib/action_dispatch/journey/path/pattern.rb
+++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb
@@ -90,7 +90,7 @@ module ActionDispatch
return @separator_re unless @matchers.key?(node)
re = @matchers[node]
- "(#{re})"
+ "(#{Regexp.union(re)})"
end
def visit_GROUP(node)
@@ -183,7 +183,7 @@ module ActionDispatch
node = node.to_sym
if @requirements.key?(node)
- re = /#{@requirements[node]}|/
+ re = /#{Regexp.union(@requirements[node])}|/
@offsets.push((re.match("").length - 1) + @offsets.last)
else
@offsets << @offsets.last