Fix a spec failure on JRuby.