New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sub hash() and improve Parcel.hash #2094
Comments
From @TimbusThis is just a followup fix to ticket #75584 that pmichaud was going to do |
From @Timbus0001-Make-sub-hash-call-the-.hash-method-on-its-arguments.patchFrom 3c7766f14759919d0a2bb6ce4c4ab35c34ec0ead Mon Sep 17 00:00:00 2001
From: Jarrod <gigantic.midget@gmail.com>
Date: Tue, 24 Aug 2010 20:41:40 +1000
Subject: [PATCH] Make sub hash() call the .hash method on its arguments, and change Parcel to implement its own .hash method
---
src/builtins/Parcel.pir | 9 ---------
src/core/Parcel.pm | 4 ++++
src/core/operators.pm | 3 +--
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/builtins/Parcel.pir b/src/builtins/Parcel.pir
index e0e9710..6fb697a 100644
--- a/src/builtins/Parcel.pir
+++ b/src/builtins/Parcel.pir
@@ -46,15 +46,6 @@ A Parcel in item context becomes a Seq.
.end
-=item hash()
-
-=cut
-
-.sub 'hash' :method
- .tailcall '&hash'(self)
-.end
-
-
=item iterator()
Construct an iterator for the Parcel.
diff --git a/src/core/Parcel.pm b/src/core/Parcel.pm
index c96e94b..b1b5e03 100644
--- a/src/core/Parcel.pm
+++ b/src/core/Parcel.pm
@@ -13,4 +13,8 @@ augment class Parcel does Positional {
?? $x.notdef || ($x ~~ Positional && $x == 0)
!! self.Seq.ACCEPTS($x)
}
+
+ method hash() {
+ my %h = self.list;
+ }
}
diff --git a/src/core/operators.pm b/src/core/operators.pm
index c8d8915..5e21f2a 100644
--- a/src/core/operators.pm
+++ b/src/core/operators.pm
@@ -205,8 +205,7 @@ our sub circumfix:<{ }>(*@elements) {
}
our sub hash(*@list, *%hash) {
- my %h = (@list, %hash);
- %h
+ %(@list, %hash);
}
our multi infix:sym<//>(Mu $a, Mu $b) {
--
1.7.0.4
|
From @cokeOn Tue Aug 24 05:26:24 2010, TiMBuS wrote:
Whoops! we seem to have missed this patch, and the repository has If you feel this still needs patching, please throw us another one, and Sorry, and thanks for trying to make rakudo better. -- |
The RT System itself - Status changed from 'new' to 'open' |
@coke - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#77412 (status was 'rejected')
Searchable as RT77412$
The text was updated successfully, but these errors were encountered: