lib/mongo/lint.rb in mongo-2.13.3 vs lib/mongo/lint.rb in mongo-2.14.0.rc1

- old
+ new

@@ -2,15 +2,16 @@ # @api private module Lint # Raises LintError if +obj+ is not of type +cls+. - module_function def assert_type(obj, cls) + def assert_type(obj, cls) return unless enabled? unless obj.is_a?(cls) raise Error::LintError, "Expected #{obj} to be a #{cls}" end end + module_function :assert_type def validate_underscore_read_preference(read_pref) return unless enabled? return if read_pref.nil? unless read_pref.is_a?(Hash)