minor: fix on cbson versioning for backward compatibility
This commit is contained in:
parent
e228be7943
commit
72a166622f
@ -11,7 +11,7 @@ begin
|
|||||||
# Need this for running test with and without c ext in Ruby 1.9.
|
# Need this for running test with and without c ext in Ruby 1.9.
|
||||||
raise LoadError if ENV['TEST_MODE'] && !ENV['C_EXT']
|
raise LoadError if ENV['TEST_MODE'] && !ENV['C_EXT']
|
||||||
require 'mongo_ext/cbson'
|
require 'mongo_ext/cbson'
|
||||||
raise LoadError if CBson::VERSION != Mongo::VERSION
|
raise LoadError unless defined?(CBson::VERSION) && CBson::VERSION == Mongo::VERSION
|
||||||
require 'mongo/util/bson_c'
|
require 'mongo/util/bson_c'
|
||||||
BSON = BSON_C
|
BSON = BSON_C
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
Loading…
Reference in New Issue
Block a user