Patched for jruby support.