From: Victor Kryukov on
Hello,

in Ruby 1.9 (ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-
mingw32])

the following code

require 'date'
Date.parse(nil)

raises TypeError: can't dup NilClass. I think it should be
"ArgumentError: invalid date", same as what Date.parse reports for
strings with invalid date formats. Should I file a bug report?
From: Ryan Davis on

On Apr 27, 2010, at 19:00 , Victor Kryukov wrote:

> Hello,
>
> in Ruby 1.9 (ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-
> mingw32])
>
> the following code
>
> require 'date'
> Date.parse(nil)
>
> raises TypeError: can't dup NilClass. I think it should be
> "ArgumentError: invalid date", same as what Date.parse reports for
> strings with invalid date formats. Should I file a bug report?

sure. you can even provide a patch that raises the exception you'd rather see. post your idea to ruby-core@