mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
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
This commit is contained in:
parent
af9a151f0b
commit
d33726b837
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue