Skip to content

Instantly share code, notes, and snippets.

diff --git a/ast.c b/ast.c
index f0e8dd2eaf..df58006a96 100644
--- a/ast.c
+++ b/ast.c
@@ -7,6 +7,8 @@
#include "vm_core.h"
#include "iseq.h"
+#define RBOOL(v) ((v) ? Qtrue : Qfalse)
+
java.lang.UnsatisfiedLinkError: native method 'socket' not found for method public abstract int jnr.unixsocket.Native$LibC.socket(int,int,int)
at jnr.ffi.provider.jffi.DefaultInvokerFactory$FunctionNotFoundInvoker.invoke(DefaultInvokerFactory.java:466)
at jnr.ffi.provider.NativeInvocationHandler.invoke(NativeInvocationHandler.java:47)
at com.sun.proxy.$Proxy6.socket(Unknown Source)
at jnr.unixsocket.Native.socket(Native.java:92)
at jnr.unixsocket.UnixServerSocketChannel.<init>(UnixServerSocketChannel.java:43)
at jnr.unixsocket.UnixServerSocket.<init>(UnixServerSocket.java:32)
at jnr.unixsocket.UnixServerSocketChannel.open(UnixServerSocketChannel.java:53)
at jnr.unixsocket.UnixSocketChannelTest.startServer(UnixSocketChannelTest.java:95)
at jnr.unixsocket.UnixSocketChannelTest.testInterruptRead(UnixSocketChannelTest.java:59)
/**
* If you know you have an ASCII ByteList you should do something else. This will continue walking the
* bytelist 'while' as long as each continues to be true. When it stops being true it will return the
* last byte index processed (on full walk it will be length otherwise the beginning of the codepoint
* which did not satisfy each.
*
* @param bytelist of the mbc-laden bytes
* @param offset place in bytes to search past begin
* @param each the closure which walks the codepoints
* @return length if all codepoints match. index (ignoring begin) if not.
rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset)
{
const char *m = name;
const char *e = m + len;
int type = ID_JUNK;
if (!rb_enc_asciicompat(enc)) return -1;
if (!m || len <= 0) return -1;
switch (*m) {
case '\0':
static const char id_types[][8] = {
"local",
"instance",
"invalid",
"global",
"attrset",
"const",
"class",
"junk",
};
def +(a, &no)
yield a, "noooes"
end
public :+
self.+(2, &proc { |*a| p a })
@enebo
enebo / wot.rb
Last active March 31, 2020 21:40
def [](a, &foo)
yield a, "wot???"
nil
end
public :[]
def []=(a, b, &foo)
yield a, b
end
diff --git a/platformlauncher.cpp b/platformlauncher.cpp
index 8205751..fe54278 100644
--- a/platformlauncher.cpp
+++ b/platformlauncher.cpp
@@ -147,10 +147,8 @@ bool PlatformLauncher::start(char* argv[], int argc, DWORD *retCode, const char*
suppressConsole = false;
} else {
if (jdkhome.empty()) {
- if (!jvmLauncher.initialize(REQ_JAVA_VERSION)) {
- logErr(false, true, "Cannot find Java %s or higher.", REQ_JAVA_VERSION);
Starting platform...
Binary name is: jruby
Version: 1.1.12
initPlatformDir: trying to find executable on PATH
File "c:\jruby-9.2.11.0\bin\jruby.dll" exists
Module: c:\jruby-9.2.11.0\bin\jruby.dll
Platform dir: c:\jruby-9.2.11.0
Parsing arguments:
-Xtrace
@enebo
enebo / a.diff
Created February 25, 2020 20:31
diff --git a/core/src/main/java/org/jruby/Ruby.java b/core/src/main/java/org/jruby/Ruby.java
index d21b780e1a..d530c60e84 100644
--- a/core/src/main/java/org/jruby/Ruby.java
+++ b/core/src/main/java/org/jruby/Ruby.java
@@ -2924,10 +2924,16 @@ public final class Ruby implements Constantizable {
Ruby runtime = context.runtime;
RubyBinding binding = RubyBinding.newBinding(runtime, context.currentBinding());
+ RubyString eventNameString = runtime.newString(eventName.equals("c_return") ?
+ "c-return" :