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: b1b3ece41ab5
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d2c70dc04012
Choose a head ref
  • 4 commits
  • 4 files changed
  • 1 contributor

Commits on Dec 8, 2014

  1. [Truffle] Fixed a typo.

    nirvdrum committed Dec 8, 2014
    Copy the full SHA
    de32e52 View commit details
  2. Copy the full SHA
    7f494f7 View commit details
  3. Copy the full SHA
    1073a23 View commit details
  4. Copy the full SHA
    d2c70dc View commit details
Original file line number Diff line number Diff line change
@@ -492,10 +492,13 @@ public EvalNode(EvalNode prev) {
}

@Specialization
public Object eval(RubyString source, @SuppressWarnings("unused") UndefinedPlaceholder binding) {
public Object eval(VirtualFrame frame, RubyString source, @SuppressWarnings("unused") UndefinedPlaceholder binding) {
notDesignedForCompilation();

return getContext().eval(source.toString(), this);
RubyBinding newBinding = (RubyBinding) KernelNodesFactory.BindingNodeFactory.create(getContext(),
getSourceSection(), null).binding();

return getContext().eval(source.toString(), newBinding, this);
}

@Specialization
Original file line number Diff line number Diff line change
@@ -1251,7 +1251,7 @@ public RubyNode visitLocalAsgnNode(org.jruby.ast.LocalAsgnNode node) {
lhs = environment.findLocalVarNode(node.getName(), sourceSection);

if (lhs == null) {
throw new RuntimeException("shoudln't be here");
throw new RuntimeException("shouldn't be here");
}
}

Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ public RubyRootNode parse(RubyNode currentNode, RubyContext context, Source sour
final SourceSection sourceSection = source.createSection("<main>", 0, source.getCode().length());
final SharedMethodInfo sharedMethodInfo = new SharedMethodInfo(sourceSection, context.getRootLexicalScope(), "<main>", false, rootNode, false);

final TranslatorEnvironment environment = new TranslatorEnvironment(context, environmentForFrame(context, parentFrame), this, allocateReturnID(), true, true, sharedMethodInfo, sharedMethodInfo.getName(), false);
final TranslatorEnvironment environment = new TranslatorEnvironment(context, environmentForFrame(context, parentFrame), this, allocateReturnID(), true, false, sharedMethodInfo, sharedMethodInfo.getName(), false);

// Get the DATA constant

16 changes: 0 additions & 16 deletions spec/truffle/tags/core/kernel/eval_tags.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
fails:Kernel#eval is a private method
fails:Kernel#eval is a module function
fails:Kernel#eval evaluates the code within
passes:Kernel#eval coerces an object to string
fails:Kernel#eval evaluates within the scope of the eval
fails:Kernel#eval evaluates such that consts are scoped to the class of the eval
fails:Kernel#eval finds a local in an enclosing scope
fails:Kernel#eval updates a local in an enclosing scope
fails:Kernel#eval updates a local in a surrounding block scope
fails:Kernel#eval updates a local in a scope above a surrounding block scope
fails:Kernel#eval updates a local in a scope above when modified in a nested block scope
fails:Kernel#eval finds locals in a nested eval
fails:Kernel#eval does not share locals across eval scopes
fails:Kernel#eval doesn't accept a Proc object as a binding
fails:Kernel#eval does not make Proc locals visible to evaluated code
fails:Kernel#eval allows a binding to be captured inside an eval
fails:Kernel#eval uses the same scope for local variables when given the same binding
fails:Kernel#eval allows creating a new class in a binding
fails:Kernel#eval allows creating a new class in a binding created by #eval
fails:Kernel#eval includes file and line information in syntax error
fails:Kernel#eval sets constants at the toplevel from inside a block
fails:Kernel#eval uses the filename of the binding if none is provided
fails:Kernel#eval does not alter the value of __FILE__ in the binding
fails:Kernel#eval uses the receiver as self inside the eval
fails:Kernel#eval does not pass the block to the method being eval'ed
fails:Kernel#eval returns from the scope calling #eval when evaluating 'return'
fails:Kernel#eval unwinds through a Proc-style closure and returns from a lambda-style closure in the closure chain
fails:Kernel#eval raises a LocalJumpError if there is no lambda-style closure in the chain
fails:Kernel#eval can be aliased