Skip to content

Commit

Permalink
Fix .clone to deref ObjectRefs properly by calling !DEREF, which foll…
Browse files Browse the repository at this point in the history
…ows chains. Resolves RT#62828.
  • Loading branch information
jnthn committed Feb 11, 2009
1 parent d668ca9 commit 59024e0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/classes/Object.pir
Expand Up @@ -45,10 +45,7 @@ like this.

# Make a clone.
.local pmc result
$I0 = isa self, 'ObjectRef'
unless $I0 goto do_clone
self = deref self
do_clone:
self = '!DEREF'(self)
result = clone self

# Set any new attributes.
Expand Down

0 comments on commit 59024e0

Please sign in to comment.