From 28dd5d24950930f93cc510feb5caa6fd20a61ae7 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Wed, 12 Feb 2020 11:09:17 -0600 Subject: [PATCH] Eval under a refined binding should reflect refinements Fixes #6017 --- core/src/main/java/org/jruby/ir/interpreter/Interpreter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/jruby/ir/interpreter/Interpreter.java b/core/src/main/java/org/jruby/ir/interpreter/Interpreter.java index 4a23dfa8c4f..3f71c9ac912 100644 --- a/core/src/main/java/org/jruby/ir/interpreter/Interpreter.java +++ b/core/src/main/java/org/jruby/ir/interpreter/Interpreter.java @@ -197,7 +197,7 @@ private static InterpreterContext prepareIC(ThreadContext context, DynamicScope IREvalScript script = new IREvalScript(runtime.getIRManager(), containingIRScope, file, lineNumber, staticScope, evalType); // enable refinements if incoming scope already has an overlay active - if (staticScope.getOverlayModuleForRead() != null) { + if (staticScope.getOverlayModuleForRead() != null || staticScope.getIRScope().maybeUsingRefinements()) { script.setIsMaybeUsingRefinements(); }