Fixed on jRuby

See https://github.com/jruby/jruby/issues/1908