removed argument type checks from Cursor.skip() and Cursor.limit() due to clash with JRuby's redefining of Integer
This commit is contained in:
parent
ffab7ba5a3
commit
2188522687
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user