-
-
Save headius/0c6d09980c36e3d5845e84adc804d9c4 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/RubyModule.java b/core/src/main/java/org/jruby/RubyModule.java | |
index 2f2ade1157..be51afa239 100644 | |
--- a/core/src/main/java/org/jruby/RubyModule.java | |
+++ b/core/src/main/java/org/jruby/RubyModule.java | |
@@ -3029,7 +3029,7 @@ public class RubyModule extends RubyObject { | |
@JRubyMethod(name = "attr_accessor", rest = true, reads = VISIBILITY) | |
public IRubyObject attr_accessor(ThreadContext context, IRubyObject[] args) { | |
// Check the visibility of the previous frame, which will be the frame in which the class is being eval'ed | |
- Visibility visibility = context.getCurrentVisibility(); | |
+ Visibility visibility = getCurrentVisibilityForDefineMethod(context); | |
IRubyObject[] result = new IRubyObject[2 * args.length]; | |
for (int i = 0; i < args.length; i++) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment