summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-17 18:16:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-17 18:16:08 +0000
commit7f860741b9763ba2e0ced8a8c59348a2d8344b18 (patch)
tree70720070a6362c164108e12b5b152591cdb9de49 /test/ruby/test_regexp.rb
parent093c3893902d04f1e72dd08403ddd15e64b0b2a1 (diff)
re.c: fix up r55036
* re.c (match_values_at): fix regression at r55036. MatchData#values_at accepts Range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index aea2f2f6ea..a8a120cf3f 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -383,6 +383,7 @@ class TestRegexp < Test::Unit::TestCase
def test_match_values_at
m = /(...)(...)(...)(...)?/.match("foobarbaz")
assert_equal(["foo", "bar", "baz"], m.values_at(1, 2, 3))
+ assert_equal(["foo", "bar", "baz"], m.values_at(1..3))
m = /(?<a>\d+) *(?<op>[+\-*\/]) *(?<b>\d+)/.match("1 + 2")
assert_equal(["1", "2", "+"], m.values_at(:a, 'b', :op))