fixes #1331 The commit avoids a bug in JRuby, and adds JRuby back to the test matrix so we can catch regressions in the future.