From: Victor Kryukov on 27 Apr 2010 21:56 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 28 Apr 2010 03:41 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@
|
Pages: 1 Prev: * Tight Teens Getting Plonked Next: uninitialized constant ActiveRecord (NameError) |