Fix tests on JRuby
Fix tests on Rubinius