lib/thor/parser/option.rb in thor-0.19.2 vs lib/thor/parser/option.rb in thor-0.19.3
- old
+ new
@@ -125,10 +125,11 @@
:string
when Hash, Array, String
@default.class.name.downcase.to_sym
end
- raise ArgumentError, "An option's default must match its type." unless default_type == @type
+ # TODO: This should raise an ArgumentError in a future version of Thor
+ warn "Expected #{@type} default value for '#{switch_name}'; got #{@default.inspect} (#{default_type})" unless default_type == @type
end
def dasherized?
name.index("-") == 0
end