diff options
author | Yusuke Endoh <[email protected]> | 2022-12-09 14:17:35 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2022-12-12 14:26:38 +0900 |
commit | b8e542b46350cc1e7975bb711082e4cc6fcb7c82 (patch) | |
tree | a5a2201d4e88006970eb8eebd56d2e73eea8b17c /test/ruby/test_regexp.rb | |
parent | f093b619a4863be96e6ebfa2fd58c77f4a360eae (diff) |
Make absent operator work at the end of the input string
https://bugs.ruby-lang.org/issues/19104#change-100542
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6902
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r-- | test/ruby/test_regexp.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 7fc8d914b7..a3c1508ff6 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1525,6 +1525,9 @@ class TestRegexp < Test::Unit::TestCase assert_equal(0, /(?~(a)c)/ =~ "abb") assert_nil($1) + + assert_equal(0, /(?~(a))/ =~ "") + assert_nil($1) end def test_backref_overrun |