Skip to content

Commit

Permalink
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/exception/errno_tags.txt

This file was deleted.

6 changes: 6 additions & 0 deletions truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java
Original file line number Diff line number Diff line change
@@ -404,6 +404,9 @@ public CoreLibrary(RubyContext context) {

for (Errno errno : Errno.values()) {
if (errno.name().startsWith("E")) {
if(errno.equals(Errno.EWOULDBLOCK) && Errno.EWOULDBLOCK.intValue() == Errno.EAGAIN.intValue()){
continue; // Don't define it as a class, define it as constant later.
}
errnoClasses.put(errno, defineClass(errnoModule, systemCallErrorClass, errno.name()));
}
}
@@ -892,6 +895,9 @@ private void initializeConstants() {
Layouts.CLASS.getFields(errnoClass).setConstant(context, node, "Errno", errno.intValue());
}

if (Errno.EWOULDBLOCK.intValue() == Errno.EAGAIN.intValue()) {
Layouts.MODULE.getFields(errnoModule).setConstant(context, node, Errno.EWOULDBLOCK.name(), errnoClasses.get(Errno.EAGAIN));
}

}

0 comments on commit b0b29cf

Please sign in to comment.