mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
string.c: rb_fs_setter
* string.c (rb_fs_setter): check and convert $; value at assignment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2e2f7df725
commit
c2bf7e6f7d
3 changed files with 26 additions and 8 deletions
|
@ -1389,15 +1389,16 @@ CODE
|
|||
assert_equal([], "".split(//, 1))
|
||||
|
||||
assert_equal("[2, 3]", [1,2,3].slice!(1,10000).inspect, "moved from btest/knownbug")
|
||||
|
||||
$; = []
|
||||
assert_raise_with_message(TypeError, /\$;/) {
|
||||
"".split
|
||||
}
|
||||
ensure
|
||||
$; = fs
|
||||
end
|
||||
|
||||
def test_fs
|
||||
assert_raise_with_message(TypeError, /\$;/) {
|
||||
$; = []
|
||||
}
|
||||
end
|
||||
|
||||
def test_split_encoding
|
||||
bug6206 = '[ruby-dev:45441]'
|
||||
Encoding.list.each do |enc|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue