Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@ public String getProgram(String... statements) {

public ScriptEngine getScriptEngine() {
LocalContextScope scope = SystemPropertyCatcher.getScope(LocalContextScope.SINGLETON);
LocalVariableBehavior behavior = SystemPropertyCatcher.getBehavior(LocalVariableBehavior.GLOBAL);
LocalVariableBehavior behavior = SystemPropertyCatcher.getBehavior(LocalVariableBehavior.PERSISTENT);
boolean lazy = SystemPropertyCatcher.isLazy(false);
ScriptingContainer container = new ScriptingContainer(scope, behavior, lazy);
SystemPropertyCatcher.setClassLoader(container);
Original file line number Diff line number Diff line change
@@ -283,10 +283,10 @@ public void testEmbedIntegration() throws ScriptException {
$this.append("first\n");
engine.put("this", $this);

assertSame($this, engine.eval("$this"));
engine.eval("$this.append( \"2\n\" )");
assertSame($this, engine.eval("this"));
engine.eval("this.append( \"2\n\" )");

Object command = engine.eval("$command = $this.java_method :append, [java.lang.String]");
Object command = engine.eval("$command = this.java_method :append, [java.lang.String]");

assertTrue( command instanceof org.jruby.RubyMethod );
//assertEquals( "append", ((Method) command).getName() );

0 comments on commit 91278e7

Please sign in to comment.