RUBY-315 deprecate BSON.max_bson_size and BSON.update_max_bson_size.

This commit is contained in:
Kyle Banker 2011-08-25 15:03:40 -04:00
parent cf0dafd6e7
commit d999a5ba4d
3 changed files with 6 additions and 0 deletions

View File

@ -29,10 +29,12 @@ module BSON
end
def self.max_bson_size
warn "BSON::BSON_CODER.max_bson_size is deprecated and will be removed in v2.0."
CBson.max_bson_size
end
def self.update_max_bson_size(connection)
warn "BSON::BSON_CODER.update_max_bson_size is deprecated and now a no-op. It will be removed in v2.0."
CBson.update_max_bson_size(connection)
end
end

View File

@ -18,10 +18,12 @@ module BSON
end
def self.max_bson_size
warn "BSON::BSON_CODER.max_bson_size is deprecated and will be removed in v2.0."
Java::OrgJbson::RubyBSONEncoder.max_bson_size(self)
end
def self.update_max_bson_size(connection)
warn "BSON::BSON_CODER.update_max_bson_size is deprecated and now a no-op. It will be removed in v2.0."
Java::OrgJbson::RubyBSONEncoder.update_max_bson_size(self, connection)
end
end

View File

@ -78,10 +78,12 @@ module BSON
end
def self.update_max_bson_size(connection)
warn "BSON::BSON_CODER.update_max_bson_size is deprecated and now a no-op. It will be removed in v2.0."
@@max_bson_size = connection.max_bson_size
end
def self.max_bson_size
warn "BSON::BSON_CODER.max_bson_size is deprecated and will be removed in v2.0."
@@max_bson_size
end