Skip to content

Instantly share code, notes, and snippets.

@yokolet
Created January 13, 2010 17:51
Show Gist options
  • Save yokolet/276400 to your computer and use it in GitHub Desktop.
Save yokolet/276400 to your computer and use it in GitHub Desktop.
diff --git a/src/org/jruby/embed/jsr223/JRubyCompiledScript.java b/src/org/jruby/em
index ea0ba5c..294c177 100644
--- a/src/org/jruby/embed/jsr223/JRubyCompiledScript.java
+++ b/src/org/jruby/embed/jsr223/JRubyCompiledScript.java
@@ -69,6 +69,7 @@ public class JRubyCompiledScript extends CompiledScript {
public Object eval(ScriptContext context) throws ScriptException {
try {
+ engine.setContext(context);
IRubyObject ret = unit.run();
if (!(ret instanceof RubyNil)) {
return JavaEmbedUtils.rubyToJava(ret);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment