lib/timecop/time_stack_item.rb in timecop-0.4.1 vs lib/timecop/time_stack_item.rb in timecop-0.4.2
- old
+ new
@@ -97,10 +97,10 @@
elsif args.empty? && arg.kind_of?(Integer)
Time.now + arg
elsif arg.nil?
Time.now
else
- if Time.respond_to?(:parse)
+ if Time.respond_to?(:parse) && arg.is_a?(String)
Time.parse(arg)
else
# we'll just assume it's a list of y/m/d/h/m/s
year = arg || 2000
month = args.shift || 1