Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Does not support continuations/bindings.
    • These features are simply missing. There is nothing which prevents them from existing short of programmer effort.
  • Fine-grained timer.
    • Benchmarking code depends on finer grained timings than the JVM supports. This may be solved in a future JVM as there is a JSR on this (which JSR?).
  • Identical thread behavior
    • Ruby uses green threads to implement the languages threading library. JRuby uses Java threads to implement Thread and friends. Without actually implementing green threads ourselves, we will not have identical thread behavior. Hopefully, any sane multi-threaded ruby script will work ok in spite of this.
  • Missing File operations Posix methods
    • The JVM is missing some file Posix operations needed by File and friends in Ruby. Some JSRs exist which may fix some of these and we could perhaps call external scripts to perform the rest. This is an area we have not spent any time looking at.

Java Limitations

    • Java consumers cannot see what we are extending (see next item on list)
      This feature will work once we have a compiler
  • Extended Java Classes in Ruby will not be visible to Java consumers
    Consider the following code:

include_class 'java.util.ArrayList'

class MyList < ArrayList
def toString
"MYLIST"
end
end

...

    • , Process, etc..  in Ruby.  We are now starting to use JNA (yes JNA and not JNI) to add as many of these as JNA can support.  For JRuby 1.1 many common ones will be available (e.g. getpid, getgid, getxxx).
  • Ruby C extensions
    • Any Ruby library which contains C extensions are not supported by JRuby.  For the more popular packages we have ported them to be Java extensions.  Others can always be ported as well.  There are some exotic ideas in how we could possibly support C native extensions, but no one is past the napkin stage on actually implementing it.  Rubinius work may provide us with an evenue to supporting them.  Until that time consider porting an extension or possibly using a similiar Java technology to do the same thing.