Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Empty should stringify to '' without complaint
(Nil.Str *should* warn, but that's a different issue, with associated breakage.)
  • Loading branch information
TimToady committed May 9, 2015
1 parent 92aed8b commit 6c5d82c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Nil.pm
Expand Up @@ -26,6 +26,9 @@ Nil.^add_fallback(

my class Empty is Nil {
# class Empty is Iterator
method new(*@) { Empty }
method Str() { '' }
method gist(*@) { 'Empty' }
method iterator(*@) { self }
method reify($n) { () }
}
Expand Down

0 comments on commit 6c5d82c

Please sign in to comment.