string-lines throws an error if input is not a string

db4
Slava Pestov 2009-02-09 00:25:46 -06:00
parent 54e4e8873a
commit 4117430762
1 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,9 @@ PRIVATE>
: split ( seq separators -- pieces )
[ split, ] { } make ;
: string-lines ( str -- seq )
GENERIC: string-lines ( str -- seq )
M: string string-lines
dup "\r\n" intersects? [
"\n" split [
but-last-slice [