summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2026-05-14 14:20:45 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2026-05-14 15:07:32 +0900
commit801a4e4a64a86077ea3b839c66185abfc3450675 (patch)
tree0178eaad32ffdab49ce6bc467d12cfb59d956913 /test
parent2ad78864079c981545efc2fd73c737efaf0c4de0 (diff)
Remove needless `+` from `MatchData#integer_at` tests
72eb59d0b23522508300896bbbe73716fe82349e introduced these tests.
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_regexp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 69e15bd4df..b519872d67 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -1694,7 +1694,7 @@ class TestRegexp < Test::Unit::TestCase
end
def test_match_integer_at
- m = /(\d+{4})(\d+{2})(\d+{2})/.match("20260308")
+ m = /(\d{4})(\d{2})(\d{2})/.match("20260308")
assert_equal(20260308, m.integer_at(0))
assert_equal(2026, m.integer_at(1))
assert_equal(3, m.integer_at(2))
@@ -1711,7 +1711,7 @@ class TestRegexp < Test::Unit::TestCase
end
def test_match_integer_at_name
- m = /(?<y>\d+{4})(?<m>\d+{2})(?<d>\d+{2})/.match("20260308")
+ m = /(?<y>\d{4})(?<m>\d{2})(?<d>\d{2})/.match("20260308")
assert_equal(2026, m.integer_at("y"))
assert_equal(3, m.integer_at("m"))
assert_equal(8, m.integer_at("d"))