lib/virtus/attribute/builder.rb in virtus-1.0.2 vs lib/virtus/attribute/builder.rb in virtus-1.0.3
- old
+ new
@@ -51,11 +51,11 @@
initialize_primitive
end
# @api private
def pending?
- @pending
+ @pending if defined?(@pending)
end
private
# @api private
@@ -105,10 +105,10 @@
type ||=
if klass < Axiom::Types::Type
determine_type(klass.primitive)
elsif EmbeddedValue.handles?(klass)
EmbeddedValue
- elsif klass < Enumerable
+ elsif klass < Enumerable && !(klass <= Range)
Collection
end
end
type || default