Skip to content

Instantly share code, notes, and snippets.

jruby -Xbacktrace.style=raw -Xir.debug=false -J-cp build_lib/jgrapht-jdk1.5.jar -Xnobootclasspath -X-CIR bench/bench_fib_iterative.rb
-- Interpreted 106 instructions
4.579000 0.000000 4.579000 ( 4.460000)
4.315000 0.000000 4.315000 ( 4.315000)
-- Interpreted 8400424 instructions
1.9.2 ~/work/jruby master 1217% jruby -X-C --server bench/bench_fib_iterative.rb
3.865000 0.000000 3.865000 ( 3.799000)
3.673000 0.000000 3.673000 ( 3.673000)
1.9.2 ~/work/jruby master 1218% jruby --server bench/bench_fib_iterative.rb
3.770000 0.000000 3.770000 ( 3.719000)
diff --git a/src/org/jruby/RubyArray.java b/src/org/jruby/RubyArray.java
index 66f7982..4ec0bb2 100644
--- a/src/org/jruby/RubyArray.java
+++ b/src/org/jruby/RubyArray.java
@@ -67,6 +67,7 @@ import org.jruby.runtime.ThreadContext;
import static org.jruby.runtime.Visibility.*;
import static org.jruby.CompatVersion.*;
import org.jruby.runtime.builtin.IRubyObject;
+import org.jruby.runtime.callsite.CacheEntry;
import org.jruby.runtime.marshal.MarshalStream;
!ta
tar xzf release/dist/jruby-bin-1.6.0.RC2.tar.gz
system ~/work 611% ./jruby-1.6.0.RC2/bin/jruby --1.9 -S gem install rails
Fetching: activesupport-3.0.5.gem (123%)ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
too many connection resets (http://production.cf.rubygems.org/gems/activesupport-3.0.5.gem)
system ~/work 612% ./jruby-1.6.0.RC2/bin/jruby --1.9 -S gem install rails
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository
ERROR: While executing gem ... (ArgumentError)
invalid byte sequence in UTF-8
---
layout: post
title: JRuby 1.6.0.RC3 Released
---
The JRuby community is pleased to announce the release of JRuby 1.6.0.RC3.
- Homepage: [http://www.jruby.org/](http://www.jruby.org/)
- Download: [http://www.jruby.org/download](http://www.jruby.org/download)
JRuby 1.6.0.RC3 is the last release candidate of JRuby 1.6.0.
Key Summary Patch attached Patch Submitted Testcase included
JRUBY-5491 jruby.reify.classes fails with optparse.rb (trinidad)
JRUBY-5502 RubyUNIXSocket#recvfrom overflows temporary buffer
JRUBY-5337 No such file to load -- rack when booting JRuby 1.6.0RC1 Rails app in Tomcat
JRUBY-5472 JRuby bash script no longer supports -X-C and similar options
JRUBY-5534 Performance issue with JRuby 1.6
JRUBY-5393 [1.9] Can't run debugger
JRUBY-5481 Marshal specs failing in 1.8 mode
JRUBY-5509 gem update_rubygems Fails on JRuby 1.5.3
JRUBY-5477 Caller stacks now include AbstractScript.java
"\x04\bI\"\babc\x06:\rencoding\"\x11Windows-1252"
The JRuby community is pleased to announce the release of JRuby 1.6.0.
- Homepage: [http://www.jruby.org/](http://www.jruby.org/)
- Download: [http://www.jruby.org/download](http://www.jruby.org/download)
JRuby 1.6.0 final is out!
JRuby 1.6.0 is the largest release of JRuby to date. This release
fixes hundreds of user issues and brings compatibility with Ruby 1.9.2
to a very high level. We have made Windows a primary supported
require 'fileutils'
launcher = ARGV.shift || "jruby"
options = ARGV.shift || ""
$jruby = "#{launcher} #{options}"
def jruby_command(command, *args)
command = "#{$jruby} -S #{command} #{args.join(' ')}"
puts "$ #{command}"
value = system command
Java in Ruby: Scripting Java in JRuby
One major benefit of JRuby is the ability to import Java classes and then use them as if they were POROs (Plain Old Ruby Objects). This feature makes Java fun again. You can pull in legacy code and sculpt an API which fits nicely into your Ruby code. You can access novel or robust Java libraries to bridge a gap in existing Ruby libraries.
This talk will:
* Show basics of interacting with Java classes from within Ruby
* Point out Gotchas
* Give style hints to make Java APIs fit better into the Ruby way
@enebo
enebo / gist:897171
Created March 31, 2011 20:19
A.java
import java.net.InetSocketAddress;
import java.nio.channels.DatagramChannel;
public class A {
public static void main(String[] args) {
try {
InetSocketAddress addr = new InetSocketAddress(4321);
DatagramChannel channel = DatagramChannel.open();
System.out.println("Connected: " + channel.isConnected());
System.out.println("Bound: " + channel.socket().isBound());