lib/h/h.rb in modalh-1.1.8 vs lib/h/h.rb in modalh-1.1.9
- old
+ new
@@ -11,10 +11,10 @@
type = options[:type] || Float
type = Float if type==:number
type = check_type(type)
if type.ancestors.include?(Numeric)
number_from(txt, options)
- elsif type.respond_to?(:strftime)
+ elsif !(type.instance_methods & [:strftime, 'strftime']).empty?
date_from(txt, options)
elsif type==:logical || type==:boolean
logical_from(txt, options)
else
nil