-
-
Save zoffixznet/ecdb9f893faff9580da5055ab64f5760 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpan@perlbuild2~/CPANPRC/rakudo (nom)$ gd | |
diff --git a/src/core/Array.pm b/src/core/Array.pm | |
index 13f430a..d9b464e 100644 | |
--- a/src/core/Array.pm | |
+++ b/src/core/Array.pm | |
@@ -47,7 +47,7 @@ my class Array { # declared in BOOTSTRAP | |
} | |
} | |
- method clone { [self] } | |
+ multi method clone(Array:D:) { [self] } | |
method iterator(Array:D:) { | |
diff --git a/src/core/Mu.pm b/src/core/Mu.pm | |
index ca266cf..8a0c2ab 100644 | |
--- a/src/core/Mu.pm | |
+++ b/src/core/Mu.pm | |
@@ -622,7 +622,8 @@ my class Mu { # declared in BOOTSTRAP | |
SELF.^can($name) | |
} | |
- method clone(*%twiddles) { | |
+ proto method clone (|) { * } | |
+ multi method clone(*%twiddles) { | |
my $cloned := nqp::clone(self); | |
if %twiddles.elems { | |
for self.^attributes.flat -> $attr { | |
cpan@perlbuild2~/CPANPRC/rakudo (nom)$ ./perl6 -e 'Array.clone' | |
Cannot look up attributes in a Array type object | |
in block <unit> at -e line 1 | |
cpan@perlbuild2~/CPANPRC/rakudo (nom)$ ./perl6 -e 'Cool.clone' | |
cpan@perlbuild2~/CPANPRC/rakudo (nom)$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment