forked from Mirror/wren
Make join() require parentheses without a separator.
This commit is contained in:
@ -5,7 +5,7 @@ System.print([].join(",") == "") // expect: true
|
||||
System.print([1, 2, 3].join("")) // expect: 123
|
||||
|
||||
// Handle a simple list with no separator.
|
||||
System.print([1, 2, 3].join) // expect: 123
|
||||
System.print([1, 2, 3].join()) // expect: 123
|
||||
|
||||
// Does not quote strings.
|
||||
System.print([1, "2", true].join(",")) // expect: 1,2,true
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
var a = 1..3
|
||||
|
||||
System.print(a.join) // expect: 123
|
||||
System.print(a.join()) // expect: 123
|
||||
System.print(a.join(", ")) // expect: 1, 2, 3
|
||||
|
||||
Reference in New Issue
Block a user