Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3a0f427f207a
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 422d92f5591a
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 17, 2014

  1. Copy the full SHA
    b38cd18 View commit details
  2. 1
    Copy the full SHA
    98fa7a6 View commit details
  3. Enable more MRI eval tests.

    I believe the toplevel binding tests here will be sufficient for
    testing #2207.
    headius committed Nov 17, 2014
    Copy the full SHA
    422d92f View commit details
Showing with 10 additions and 106 deletions.
  1. +10 −2 core/src/main/java/org/jruby/ir/Compiler.java
  2. +0 −102 test/jruby/test_eval_with_binding.rb
  3. +0 −2 test/mri/excludes/TestEval.rb
12 changes: 10 additions & 2 deletions core/src/main/java/org/jruby/ir/Compiler.java
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
import org.jruby.ir.targets.JVMVisitor;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.Block;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.Helpers;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;
@@ -88,11 +89,18 @@ public IRubyObject __file__(ThreadContext context, IRubyObject self, IRubyObject

@Override
public IRubyObject load(ThreadContext context, IRubyObject self, boolean wrap) {
Helpers.preLoadCommon(context, staticScope, false);
DynamicScope tlbScope = scope.getTopLevelBindingScope();
if (tlbScope == null) {
context.preMethodScopeOnly(staticScope);
} else {
context.preScopedBody(tlbScope);
tlbScope.growIfNeeded();
}

try {
return __file__(context, self, IRubyObject.NULL_ARRAY, Block.NULL_BLOCK);
} finally {
Helpers.postLoad(context);
context.popScope();
}
}
};
102 changes: 0 additions & 102 deletions test/jruby/test_eval_with_binding.rb

This file was deleted.

2 changes: 0 additions & 2 deletions test/mri/excludes/TestEval.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
exclude :test_define_method_toplevel, "needs investigation"
exclude :test_eval_ascii_incompatible, "needs investigation"
exclude :test_eval_location_fstring, "needs investigation"
exclude :test_eval_with_toplevel_binding, "needs investigation"
exclude :test_file_encoding, "needs investigation"
exclude :test_instance_eval_method, "needs investigation"