aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index f2fcf3fb25..d5166a82bc 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -1227,6 +1227,9 @@ CODE
assert_nil("foo".rindex(//, -100))
assert_nil($~)
+
+ assert_equal(3, "foo".rindex(//))
+ assert_equal([3, 3], $~.offset(0))
end
def test_rjust