lib/repeatable/conversions.rb in repeatable-1.0.0 vs lib/repeatable/conversions.rb in repeatable-1.1.0

- old
+ new

@@ -1,16 +1,20 @@ +# typed: strict module Repeatable module Conversions + extend T::Sig + module_function + sig { params(arg: Object).returns(::Date) } def Date(arg) case arg when Date, Time arg.to_date else Date.parse(arg) end rescue ArgumentError - raise TypeError, "Cannot convert #{arg.inspect} to Date" + Kernel.raise TypeError, "Cannot convert #{arg.inspect} to Date" end end end