Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8697907abf0b
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 25ec188d9eba
Choose a head ref
  • 2 commits
  • 6 files changed
  • 1 contributor

Commits on Mar 3, 2015

  1. Copy the full SHA
    ac59f7a View commit details
  2. Copy the full SHA
    25ec188 View commit details
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/array/clone_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/clone_tags.txt

This file was deleted.

6 changes: 0 additions & 6 deletions spec/truffle/tags/core/kernel/clone_tags.txt

This file was deleted.

3 changes: 0 additions & 3 deletions spec/truffle/tags/core/object/clone_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/clone_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -419,9 +419,11 @@ public RubyClass getClass(Object self) {

}

@CoreMethod(names = "clone")
@CoreMethod(names = "clone", taintFrom = 0)
public abstract static class CloneNode extends CoreMethodNode {

private final ConditionProfile frozenProfile = ConditionProfile.createBinaryProfile();

@Child private CallDispatchHeadNode initializeCloneNode;

public CloneNode(RubyContext context, SourceSection sourceSection) {
@@ -449,6 +451,10 @@ public Object clone(VirtualFrame frame, RubyBasicObject self) {
newObject.getOperations().setInstanceVariables(newObject, self.getOperations().getInstanceVariables(self));
initializeCloneNode.call(frame, newObject, "initialize_clone", null, self);

if (frozenProfile.profile(self.isFrozen())) {
newObject.freeze();
}

return newObject;
}