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/ b/core/src/main/java/org/jruby/util/
index 644d46da13..a2d4a8709d 100644
--- a/core/src/main/java/org/jruby/util/
+++ b/core/src/main/java/org/jruby/util/
@@ -176,10 +176,13 @@ public class ConvertBytes {
if (neg) 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(
at jnr.ffi.provider.NativeInvocationHandler.invoke(
at com.sun.proxy.$Proxy6.socket(Unknown Source)
at jnr.unixsocket.Native.socket(
at jnr.unixsocket.UnixServerSocketChannel.<init>(
at jnr.unixsocket.UnixServerSocket.<init>(
at jnr.unixsocket.UnixSocketChannelTest.startServer(
at jnr.unixsocket.UnixSocketChannelTest.testInterruptRead(
* 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] = {
View plus.rb
def +(a, &no)
yield a, "noooes"
public :+
self.+(2, &proc { |*a| p a })
View wot.rb
def [](a, &foo)
yield a, "wot???"
public :[]
def []=(a, b, &foo)
yield a, b
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-\bin\jruby.dll" exists
Module: c:\jruby-\bin\jruby.dll
Platform dir: c:\jruby-
Parsing arguments:
You can’t perform that action at this time.