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

Commits on Sep 3, 2015

  1. Copy the full SHA
    e4218fa View commit details
  2. Copy the full SHA
    67900d0 View commit details
10 changes: 3 additions & 7 deletions truffle/src/main/java/org/jruby/truffle/nodes/RubyNode.java
Original file line number Diff line number Diff line change
@@ -21,8 +21,10 @@
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import com.oracle.truffle.api.source.SourceSection;

import jnr.ffi.provider.MemoryManager;
import jnr.posix.POSIX;

import org.jcodings.specific.UTF8Encoding;
import org.jruby.RubyString;
import org.jruby.truffle.nodes.instrument.RubyWrapperNode;
@@ -214,13 +216,7 @@ public MemoryManager getMemoryManager() {
// ruby() helper

protected Object ruby(VirtualFrame frame, String expression, Object... arguments) {
return rubyWithSelf(frame, RubyArguments.getSelf(frame.getArguments()), expression, arguments);
}

protected Object rubyWithSelf(VirtualFrame frame, Object self, String expression, Object... arguments) {
final MaterializedFrame evalFrame = setupFrame(RubyArguments.getSelf(frame.getArguments()), arguments);
final DynamicObject binding = Layouts.BINDING.createBinding(getContext().getCoreLibrary().getBindingFactory(), self, evalFrame);
return getContext().eval(expression, binding, true, "inline-ruby", this);
return rubyWithSelf(RubyArguments.getSelf(frame.getArguments()), expression, arguments);
}

protected Object rubyWithSelf(Object self, String expression, Object... arguments) {
Original file line number Diff line number Diff line change
@@ -281,7 +281,7 @@ public Object readIfAvailable(DynamicObject file, int numberOfBytes) {

if (res == 0) {
CompilerDirectives.transferToInterpreter();
rubyWithSelf(file, "IO::EAGAINWaitReadable.new");
rubyWithSelf(file, "raise IO::EAGAINWaitReadable");
}

if (res < 0) {