1
0
forked from Mirror/wren

Make join() require parentheses without a separator.

This commit is contained in:
Bob Nystrom
2015-09-16 07:15:48 -07:00
parent efceee4320
commit 251752fcfb
5 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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