diff --git a/lib/mongo.rb b/lib/mongo.rb index 9998ebd..a967c47 100644 --- a/lib/mongo.rb +++ b/lib/mongo.rb @@ -11,7 +11,7 @@ begin # Need this for running test with and without c ext in Ruby 1.9. raise LoadError if ENV['TEST_MODE'] && !ENV['C_EXT'] 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' BSON = BSON_C rescue LoadError