Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java b/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java
index 332d1c1..a83ebfe 100644
--- a/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java
+++ b/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java
@@ -72,7 +72,7 @@ public class InvokeDynamicSupport {
return MethodHandles.convertArguments(guardWithTest, site.type());
}
- public static boolean test(CacheEntry entry, ThreadContext context, IRubyObject caller, IRubyObject self, String name) {
+ public static boolean test(CacheEntry entry, IRubyObject self) {
package org.jruby.runtime.invokedynamic;
import java.dyn.CallSite;
import java.dyn.Linkage;
import java.dyn.MethodHandle;
import java.dyn.MethodHandles;
import java.dyn.MethodType;
import org.jruby.compiler.impl.SkinnyMethodAdapter;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;
~/projects/RailsConf2009 ➔ gem install --source http://gems.github.com jruby-rcov
Successfully installed jruby-rcov-0.8.2.2-java
1 gem installed
Installing ri documentation for jruby-rcov-0.8.2.2-java...
Installing RDoc documentation for jruby-rcov-0.8.2.2-java...
~ ➔ gem maven itext itext 1.3.1
Successfully installed itext-1.3.1-java
1 gem installed
~ ➔ cat hello_pdf.rb
require 'rubygems'
require 'itext'
import com.lowagie.text.pdf.PdfWriter
import com.lowagie.text.Document
diff --git a/bin/jruby b/bin/jruby
index 750f752..ef24cdd 100755
--- a/bin/jruby
+++ b/bin/jruby
@@ -207,6 +207,11 @@ do
shift
done
+# Force file.encoding to UTF-8 when on Mac, since Apple JDK defaults to MacRoman (JRUBY-3576)
+if [ `uname -s` = "Darwin" ]; then
ALOAD 0
INVOKEVIRTUAL ruby/__dash_e__.getCallSite0 ()Lorg/jruby/runtime/CallSite;
CHECKCAST org/jruby/runtime/callsite/CachingCallSite
ALOAD 1
ALOAD 11
INVOKESTATIC org/jruby/runtime/callsite/CachingCallSite.getMethod (Lorg/jruby/runtime/callsite/CachingCallSite;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyClass;)Lorg/jruby/internal/runtime/methods/DynamicMethod;
ALOAD 1
ALOAD 2
ALOAD 11
LDC "foo"
{method}
- klass: {other class}
- method holder: 'bench/language/bench_method_dispatch_only'
- constants: 0x06b82a64{constant pool}
- access: 0xc1000001 public
- name: 'method__1$RUBY$invoking'
- signature: '(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;'
- max stack: 8
- max locals: 14
- size of params: 4