String#split now understands string sep

This commit is contained in:
Yukihiro Matsumoto
2012-06-12 09:51:10 +09:00
parent c76abc70ff
commit 6987ba02f8
2 changed files with 27 additions and 20 deletions
+3 -1
View File
@@ -276,8 +276,10 @@ end
assert('String#split', '15.2.10.5.35') do
# without RegExp behavior is actually unspecified
a = 'abc abc abc'.split
b = 'a,b,c,,d'.split(',')
a == ['abc', 'abc', 'abc']
a == ['abc', 'abc', 'abc'] and
b == ["a", "b", "c", "", "d"]
end
# TODO ATM broken assert('String#sub', '15.2.10.5.36') do