Skip to content

Commit 784bd9a

Browse files
authored
RUBY-2846 use BSON _bson_to_i method if it exists (#5473)
* RUBY-2896 use BSON _bson_to_i method if it exists * RUBY-2846 change bson_master gemfile to test changes * Update gemfiles/bson_master.gemfile
1 parent 6407218 commit 784bd9a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/mongoid/extensions/time_with_zone.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ def mongoize
2626
end
2727

2828
# This code is copied from Time class extension in bson-ruby gem. It
29-
# should be removed from here when added to bson-ruby.
30-
# See https://jira.mongodb.org/browse/RUBY-2846.
29+
# should be removed from here when the minimum BSON version is 5+.
30+
# See https://jira.mongodb.org/browse/MONGOID-5491.
3131
def _bson_to_i
32+
return super if defined?(super)
3233
# Workaround for JRuby's #to_i rounding negative timestamps up
3334
# rather than down (https://github.com/jruby/jruby/issues/6104)
3435
if BSON::Environment.jruby?

0 commit comments

Comments
 (0)