diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-11 17:35:03 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-11 17:35:03 +0000 |
| commit | cc3540ba811a2f0f44a5e2794f961f946e9239eb (patch) | |
| tree | 89fb1d18a3eee71f5bda315c8e85a26b228c0db5 /test/ruby | |
| parent | b9190c6a5af2e8705ed6b151da6641f5f9191700 (diff) | |
merge revision(s) 57374: [Backport #13135]
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/branches/ruby_2_4@57864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -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 4dee245462..5b4e27e0fa 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1217,6 +1217,9 @@ CODE assert_nil("foo".rindex(//, -100)) assert_nil($~) + + assert_equal(3, "foo".rindex(//)) + assert_equal([3, 3], $~.offset(0)) end def test_rjust |
