mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
String#split now understands string sep
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user