Skip to content

Instantly share code, notes, and snippets.

@uasi
Created December 14, 2010 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uasi/740396 to your computer and use it in GitHub Desktop.
Save uasi/740396 to your computer and use it in GitHub Desktop.
Makes 'foo'.new return Str()
diff --git a/src/builtins/Str.pir b/src/builtins/Str.pir
index ebee051..4c653cb 100644
--- a/src/builtins/Str.pir
+++ b/src/builtins/Str.pir
@@ -28,6 +28,14 @@ as the Perl 6 C<Str> class.
.tailcall '&infix:<eq>'(topic, self)
.end
+=item new()
+
+=cut
+
+.sub 'new' :method
+ $P0 = new 'Str'
+ .return($P0)
+.end
=item perl()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment