Due to https://github.com/rubygems/bundler/issues/6678 we are currently not testing the driver and Mongoid against bson master. Occasionally this causes a problem when multiple bson releases are required to fix regressions that only manifest on jruby, such as those in the 4.8 series of bson releases.
There appears to be a way of testing against bson master by manually building and installing bson as described in https://github.com/jruby/jruby/issues/5292#issuecomment-594250674:
This should work if we bump the version in master immediately prior to release, i.e. master claims to be the same version as most recent release. (The other scenarios might also work but could have issues.)