Last active
December 3, 2021 16:05
-
-
Save headius/fdf6010b0204d412386c327e55cfae8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/src/main/java/org/jruby/ext/set/RubySet.java b/core/src/main/java/org/jruby/ext/set/RubySet.java | |
index 85dbf33d42..5d8e0c73dd 100644 | |
--- a/core/src/main/java/org/jruby/ext/set/RubySet.java | |
+++ b/core/src/main/java/org/jruby/ext/set/RubySet.java | |
@@ -304,16 +304,14 @@ public class RubySet extends RubyObject implements Set { | |
@JRubyMethod | |
public IRubyObject initialize_dup(ThreadContext context, IRubyObject orig) { | |
- RubyClass superClass = orig.getMetaClass().getSuperClass(); | |
- sites(context).initialize_dup_super.call(context, this, this, superClass, "initialize_dup", orig); | |
+ sites(context).initialize_dup_super.call(context, this, this, context.runtime.getClassFromPath("Set"), "initialize_dup", orig); | |
setHash((RubyHash) (((RubySet) orig).hash).dup(context)); | |
return this; | |
} | |
@JRubyMethod | |
public IRubyObject initialize_clone(ThreadContext context, IRubyObject orig) { | |
- RubyClass superClass = orig.getMetaClass().getSuperClass(); | |
- sites(context).initialize_clone_super.call(context, this, this, superClass, "initialize_clone", orig); | |
+ sites(context).initialize_clone_super.call(context, this, this, context.runtime.getClassFromPath("Set"), "initialize_clone", orig); | |
setHash((RubyHash) (((RubySet) orig).hash).rbClone(context)); | |
return this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment