Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[common] Add a multi method Str(Mu:U $self:) { ... } to Mu so type ob…
…jects can stringify. Finally! \o/
  • Loading branch information
jnthn committed Nov 13, 2010
1 parent 14e2274 commit 8f4d667
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/NQP/P6Objects.pm
Expand Up @@ -6,4 +6,9 @@ class Mu {
method CREATE() {
nqp::instance_of(self)
}

proto method Str() { * }
multi method Str(Mu:U $self:) {
self.HOW.name(self) ~ '()'
}
}

0 comments on commit 8f4d667

Please sign in to comment.