lib/collection_of/collection.rb in collection_of-1.0.5 vs lib/collection_of/collection.rb in collection_of-1.0.6
- old
+ new
@@ -31,11 +31,11 @@
end
def [](item)
return nil if empty?
- if item.is_a?(Fixnum)
+ if item.is_a?(0.class)
@collection[item]
else
item = item.to_sym
detect{ |i| i.name.to_sym == item }
end
@@ -83,6 +83,6 @@
def ==(other)
return other == @collection if other.is_a?(self.class)
return @collection == other if other.is_a?(Array)
super
end
-end
\ No newline at end of file
+end