After years of work, we’re proud to announce the release of JRuby 9000!
JRuby is an implementation of the Ruby programming language atop the Java virtual machine, bringing true parallelism, increased performance, and top-notch garbage collectors to the Ruby world. You can call into other JVM languages, deploy on Java servers, and take advantage of the massive Java tooling ecosystem. At the same time, “It’s Just Ruby”… we pride ourselves on compatibility and on being a Ruby implementation first, and a JVM language second.
We’ve put an enormous amount of effort into this release, and we wanted to share with you why we’re so excited.
During JRuby 1.7.x we had the brilliant idea to support multiple compatibility
levels of Ruby from the same runtime. If you passed ‘–1.8’ you would be
running JRuby in 1.8.7 compatibility mode. Passing ‘–1.9’ would be running
in1.9.3 compatibility mode.
As it turned out this ended up being extremely messy internally. We were forced
to start versioning method names (e.g. inspect or
inspect19). We would get bug reports where we had a 1.9 method
calling a 1.8 method which did the wrong thing. We confused people making
native extensions – “which method do I call?” In hindsight, this idea was
too difficult to maintain.
For JRuby 9000 we only support a single version of Ruby. For 184.108.40.206 we will
support Ruby 2.2, the current version of Ruby. As new versions of Ruby come out you should expect to see
a version of JRuby come out that supports the same features.
JRuby 9000 is the ninth major release of JRuby. We opted to go with 9000 as a code name and 220.127.116.11 as a version number to separate it from Ruby’s version numbers (1.8, 1.9, 2.0 etc). We frequently ran into confusion about our version numbers versus Ruby’s, and neither “1.8” nor “2.0” would do anything but make that worse.
Going forward, expect to see maintenance releases versioned as 9.0.x and Ruby compatibility updates numbered as 9.x.
More than five years ago Subramanya Sastry (subbu) expressed an interest in
helping us work on a new runtime for JRuby. It was based, in part, on his
PhD experience designing a static optimizing compiler for Java. From this
beginning, we have worked with subbu to build a new runtime (called IR) which
will look pretty familiar to anyone who has ever taken a compiler course in
For JRuby 9000, this new runtime runs things about as fast as JRuby 1.7 but we
have years worth of plans for improving performance. At this point, we are
only executing conservative static optimizations. Over the next several months
we will start enabling profiled optimizations and things will start to get
exciting. The ability to perform more aggressive optimizations like unboxed
math and inlining methods and the blocks they call will open up
an entire new dimension for JRuby’s performance.
IR is the beginning of a new road for performance for JRuby. We hope to
ship continual performance improvements during our point releases.
Native Process and IO
During the JRuby 9000 dev cycle, we decided it was time to improve the POSIX behavior of our Process and IO subsystems.
In C Ruby, IO and Process are implemented directly atop the standard C library functions. As a result, they reflect behaviors
often hidden when running Java applications, where those APIs are wrapped in many layers of abstraction. For example, a
subprocess launched from Java can’t be read from in a nonblocking way, can’t be signaled, can’t inherit open files and
from the parent process, and many other limitations. In short, we realized we’d need to go native to be truly compatible.
JRuby 9000 now uses native operations for much of IO and almost all of Process. This makes us the first
POSIX-friendly JVM language, with full support for spawning processes, inheriting open streams, perfoming nonblocking
operations on all types of IO, and generally fitting well into a POSIX environment.
Years of Work
We first started talking about the next JRuby a few years ago, and the IR work started years before that. JRuby 9000 represents
the largest (by far!) release we’ve ever done.
- Just counting the time since we branched, there have been over 5500 commits by 104 contributors. That’s a rate of 7 commits
per day for two years.
- We fixed 468 issues during our preview and release candidate cycle. Your bug reports were crucial to delivering a high quality release.
With all the work that has gone into JRuby 9000, we’re very proud of what we’ve achieved.
JRuby 9000 can be installed in the same ways as previous versions. If you are using Windows, we recommend the Windows Executable installer. If you are using Linux or Mac OS X, we recommend using RVM by running the command
rvm install jruby-18.104.22.168.
You can also install the JRuby 9000 binaries by downloading the latest TAR or ZIP file from the JRuby Downloads page, and putting the bin directory on your PATH. For more information on installing JRuby, see the Getting Started with JRuby guide on the Wiki.
We’re a very friendly community and we welcome all users to our mailing list, our IRC channel (#jruby on Freenode), and our team Twitter account. File bugs against our Github project and check out our community page for more information.
Welcome to the future…JRuby 9000 is here!