develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35623 - trunk/languages/perl6/src/builtins

From:
jonathan
Date:
January 16, 2009 03:47
Subject:
[svn:parrot] r35623 - trunk/languages/perl6/src/builtins
Message ID:
20090116114704.6A097CB9AE@x12.develooper.com
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)



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About