removed argument type checks from Cursor.skip() and Cursor.limit() due to clash with JRuby's redefining of Integer

This commit is contained in:
Ijonas Kisselbach 2010-01-15 16:35:25 +00:00 committed by Kyle Banker
parent ffab7ba5a3
commit 2188522687

View File

@ -156,7 +156,6 @@ module Mongo
def limit(number_to_return=nil) def limit(number_to_return=nil)
return @limit unless number_to_return return @limit unless number_to_return
check_modifiable check_modifiable
raise ArgumentError, "limit requires an integer" unless number_to_return.is_a? Integer
@limit = number_to_return @limit = number_to_return
self self
@ -174,7 +173,6 @@ module Mongo
def skip(number_to_skip=nil) def skip(number_to_skip=nil)
return @skip unless number_to_skip return @skip unless number_to_skip
check_modifiable check_modifiable
raise ArgumentError, "skip requires an integer" unless number_to_skip.is_a? Integer
@skip = number_to_skip @skip = number_to_skip
self self