You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ( // O_NDELAY not defined in OpenFlags//OpenFlags.O_NDELAY.defined() ||OpenFlags.O_NONBLOCK.defined()) {
if (!OpenFlags.O_NONBLOCK.defined()) {
// # define O_NONBLOCK O_NDELAY
}
/* do not block on open or for data to become available */constants.setConstant("NONBLOCK", runtime.newFixnum(OpenFlags.O_NONBLOCK.intValue()));
} elseif (Platform.IS_WINDOWS) {
// FIXME: Should NONBLOCK exist for Windows fcntl flags?constants.setConstant("NONBLOCK", runtime.newFixnum(1));
}
O_NONBLOCK isn't defined under Windows so the platform check should come first.
if (Platform.IS_WINDOWS) {
// FIXME: Should NONBLOCK exist for Windows fcntl flags?constants.setConstant("NONBLOCK", runtime.newFixnum(1));
} elseif (OpenFlags.O_NONBLOCK.defined()) {
/* do not block on open or for data to become available */constants.setConstant("NONBLOCK", runtime.newFixnum(OpenFlags.O_NONBLOCK.intValue()));
}
Thanks!
Original stack trace follows.
Caused by: java.lang.NoSuchMethodError: jnr.constants.platform.OpenFlags.defined()Z
at org.jruby.RubyFile.createFileClass(RubyFile.java:148)
at org.jruby.Ruby.initCore(Ruby.java:1551)
at org.jruby.Ruby.bootstrap(Ruby.java:1336)
at org.jruby.Ruby.init(Ruby.java:1227)
at org.jruby.Ruby.newInstance(Ruby.java:330)
at org.jruby.embed.internal.AbstractLocalContextProvider.getGlobalRuntime(AbstractLocalContexProvider.java:82)
at org.jruby.embed.internal.SingletonLocalContextProvider.getRuntime(SingletonLocalContextProider.java:99)
at org.jruby.embed.internal.BiVariableMap.getRuntime(BiVariableMap.java:108)
at org.jruby.embed.internal.BiVariableMap.getTopSelf(BiVariableMap.java:240)
at org.jruby.embed.internal.BiVariableMap.getReceiverObject(BiVariableMap.java:236)
at org.jruby.embed.internal.BiVariableMap.put(BiVariableMap.java:331)
at org.jruby.embed.internal.BiVariableMap.put(BiVariableMap.java:315)
at org.jruby.embed.ScriptingContainer.put(ScriptingContainer.java:1166)
at cucumber.runtime.jruby.JRubyBackend.<init>(JRubyBackend.java:54)
The text was updated successfully, but these errors were encountered:
This is strange. The fix in #3958 is probably fine, but this error should not happen. NoMethodError only happens when code that previously compiled successfully now turns out to be calling a method that does not exist. In short, there has to be a version mismatch here; some older version of jnr-constants is getting into your environment.
The stack trace snippet at the end is under Windows 7, using jruby-complete 9.0.1.0 with Java 1.7.0_25.
The cause is this bit of code from https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyFile.java#L148
O_NONBLOCK isn't defined under Windows so the platform check should come first.
Thanks!
Original stack trace follows.
The text was updated successfully, but these errors were encountered: