Permalink
Browse files

Fixed a bug in the message for unsupported types.

  • Loading branch information...
1 parent 0684fb5 commit 0f38788ebd9dfa4395b021255b13ee7b55a58cb5 @sam sam committed Apr 10, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/data_mapper/property.rb
@@ -261,7 +261,7 @@ def inspect
def initialize(model, name, type, options)
raise ArgumentError, "+model+ is a #{model.class}, but is not a type of Resource" unless Resource === model
raise ArgumentError, "+name+ should be a Symbol, but was #{name.class}" unless Symbol === name
- raise ArgumentError, "+type+ was #{type.class}, which is not a supported type: #{TYPES * ', '}" unless TYPES.include?(type) || (type.respond_to?(:ancestors) && type.ancestors.include?(DataMapper::Type) && TYPES.include?(type.primitive))
+ raise ArgumentError, "+type+ was #{type.inspect}, which is not a supported type: #{TYPES * ', '}" unless TYPES.include?(type) || (type.respond_to?(:ancestors) && type.ancestors.include?(DataMapper::Type) && TYPES.include?(type.primitive))
if (unknown_options = options.keys - PROPERTY_OPTIONS).any?
raise ArgumentError, "options contained unknown keys: #{unknown_options * ', '}"

0 comments on commit 0f38788

Please sign in to comment.