Author: jonathan
Date: Fri Jan 16 03:47:03 2009
New Revision: 35623
Modified:
trunk/languages/perl6/src/builtins/op.pir
Log:
[rakudo] infix:<but> needs to be aware of ObjectRef, otherwise we end up affecting the original object.
Modified: trunk/languages/perl6/src/builtins/op.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/op.pir (original)
+++ trunk/languages/perl6/src/builtins/op.pir Fri Jan 16 03:47:03 2009
@@ -498,6 +498,10 @@
# Now we have a role, copy the value and call does on the copy.
have_role:
+ $I0 = isa var, 'ObjectRef'
+ unless $I0 goto not_obj_ref
+ var = deref var
+ not_obj_ref:
var = clone var
if null value goto no_value
'infix:does'(var, role, value)
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.