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

Commits on Dec 8, 2014

  1. Copy the full SHA
    5154d74 View commit details
  2. Copy the full SHA
    8a5ba25 View commit details

Commits on Dec 9, 2014

  1. [Truffle] Use a NameError rather than NoMethodError for bad reference…

    …s on main object.
    
    Fixes #2289 for Truffle: Incorrect exception type for bad reference.
    nirvdrum committed Dec 9, 2014
    Copy the full SHA
    4793478 View commit details
Original file line number Diff line number Diff line change
@@ -271,6 +271,10 @@ public Object methodMissing(RubyBasicObject self, Object[] args, RubyProc block)
}

private Object methodMissing(RubyBasicObject self, RubySymbol name, Object[] args, RubyProc block) {
if (self == getContext().getCoreLibrary().getMainObject()) {
throw new RaiseException(getContext().getCoreLibrary().nameError(String.format("undefined local variable or method `%s' for main:Object", name.toString()), this));
}

throw new RaiseException(getContext().getCoreLibrary().noMethodError(name.toString(), self.toString(), this));
}

Original file line number Diff line number Diff line change
@@ -508,7 +508,7 @@ public Object eval(RubyString source, RubyBinding binding) {
return getContext().eval(source.toString(), binding, this);
}

@Specialization(guards = "!isString")
@Specialization(guards = "!isString(arguments[0])")
public Object eval(VirtualFrame frame, RubyBasicObject object, @SuppressWarnings("unused") UndefinedPlaceholder binding) {
notDesignedForCompilation();

@@ -518,7 +518,7 @@ public Object eval(VirtualFrame frame, RubyBasicObject object, @SuppressWarnings
return eval(frame, object, defaultBinding);
}

@Specialization(guards = "!isString")
@Specialization(guards = "!isString(arguments[0])")
public Object eval(VirtualFrame frame, RubyBasicObject object, RubyBinding binding) {
notDesignedForCompilation();

Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ public Object executeDispatch(
return doRubyBasicObject(
frame,
first,
(LexicalScope) lexicalScope,
lexicalScope,
receiverObject,
methodName,
blockObject,
@@ -79,7 +79,7 @@ public Object executeDispatch(
return doUnboxedObject(
frame,
first,
(LexicalScope) lexicalScope,
lexicalScope,
receiverObject,
methodName,
blockObject,
1 change: 0 additions & 1 deletion spec/truffle/tags/core/kernel/eval_tags.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
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 does not share locals across eval scopes
fails:Kernel#eval doesn't accept a Proc object as a binding
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