Skip to content

Instantly share code, notes, and snippets.

Thomas E Enebo enebo

View GitHub Profile
View a.diff
diff --git a/core/src/main/java/org/jruby/util/ConvertBytes.java b/core/src/main/java/org/jruby/util/ConvertBytes.java
index 644d46da13..a2d4a8709d 100644
--- a/core/src/main/java/org/jruby/util/ConvertBytes.java
+++ b/core/src/main/java/org/jruby/util/ConvertBytes.java
@@ -176,10 +176,13 @@ public class ConvertBytes {
if (neg) newSize++;
string.resize(newSize);
ByteList byteList = string.getByteList();
+ byte[] bytes = byteList.getUnsafeBytes();
+ int beg = byteList.begin();
View newline.diff
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)
+
View err.txt
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)
View a.java
/**
* 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.
View yow..c
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':
View a.c
static const char id_types[][8] = {
"local",
"instance",
"invalid",
"global",
"attrset",
"const",
"class",
"junk",
};
View plus.rb
def +(a, &no)
yield a, "noooes"
end
public :+
self.+(2, &proc { |*a| p a })
View wot.rb
def [](a, &foo)
yield a, "wot???"
nil
end
public :[]
def []=(a, b, &foo)
yield a, b
end
View a.diff
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);
View a.txt
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
You can’t perform that action at this time.