diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-19 08:13:03 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-19 08:13:03 +0000 |
commit | 4c51b5c39f776d31de3694c162fc45b50ab9d22a (patch) | |
tree | a44978369f7464e3a2fc14abaebdc33ce6006240 /test/ruby/test_string.rb | |
parent | 7ad40182f3ab9bc19db65b6ac082097b2687c112 (diff) | |
download | ruby-4c51b5c39f776d31de3694c162fc45b50ab9d22a.tar.gz |
string.c: rindex(//) should set $~.
This seems a bug introduced by r520 (1.4.0). [ruby-core:79110] [Bug #13135]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r-- | test/ruby/test_string.rb | 3 |
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 |