tested with jruby and corrected test that differs in jruby (from MRI)