Skip to content

Commit

Permalink
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -708,6 +708,16 @@ public DynamicObject systemCallError(String message, Node currentNode) {
context.getCallStack().getBacktrace(currentNode));
}

// IO::EAGAINWaitReadable

@TruffleBoundary
public DynamicObject eAGAINWaitReadable(Node currentNode) {
return ExceptionOperations.createRubyException(
context.getCoreLibrary().getEagainWaitReadable(),
coreStrings().RESOURCE_TEMP_UNAVAIL.createInstance(),
context.getCallStack().getBacktrace(currentNode));
}

// SystemExit

@TruffleBoundary
Original file line number Diff line number Diff line change
@@ -70,9 +70,7 @@
import org.jruby.util.ByteList;
import org.jruby.util.Dir;
import org.jruby.util.unsafe.UnsafeHolder;

import java.nio.ByteBuffer;

import static org.jruby.truffle.core.string.StringOperations.rope;

public abstract class IOPrimitiveNodes {
@@ -265,10 +263,7 @@ public Object readIfAvailable(DynamicObject file, int numberOfBytes) {
PointerPrimitiveNodes.NULL_POINTER, PointerPrimitiveNodes.NULL_POINTER, timeoutObject));

if (res == 0) {
throw new RaiseException(
Layouts.CLASS.getInstanceFactory(coreLibrary().getEagainWaitReadable()).newInstance(
coreStrings().RESOURCE_TEMP_UNAVAIL.createInstance(),
Errno.EAGAIN.intValue()));
throw new RaiseException(coreExceptions().eAGAINWaitReadable(this));
}

final byte[] bytes = new byte[numberOfBytes];

0 comments on commit 35c6a8e

Please sign in to comment.