You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/06/10 00:27:45 UTC

[groovy] branch GROOVY_2_5_X updated: GROOVY-9485: fix regression of GROOVY-3456 after refactor

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
     new eef4209  GROOVY-9485: fix regression of GROOVY-3456 after refactor
eef4209 is described below

commit eef42094ae046cbeddc4c485bb6f1a2c37b1f717
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Jun 10 10:27:38 2020 +1000

    GROOVY-9485: fix regression of GROOVY-3456 after refactor
---
 .../src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy b/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
index 31a01ca..52302f3 100644
--- a/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
+++ b/subprojects/groovy-groovysh/src/main/groovy/org/codehaus/groovy/tools/shell/Interpreter.groovy
@@ -51,7 +51,8 @@ class Interpreter implements Evaluator
     }
 
     Binding getContext() {
-        return shell.context
+        // GROOVY-9584: leave as call to getter not property access to avoid potential context variable in binding
+        return shell.getContext()
     }
 
     GroovyClassLoader getClassLoader() {