Project

General

Profile

Actions

Bug #6702

closed

Date should be either required or not

Added by rosenfeld (Rodrigo Rosenfeld Rosas) over 12 years ago. Updated over 5 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
Backport:
[ruby-core:46200]

Description

Today I was trying to do some experiment with IRB: "Date.today" threw a NoMethodError.

But Date was defined: "defined? Date" == "constant".

If I explicitly required for "date" it worked, but this is pretty much weird. It would be better if either:

  • I got an undefined "Date" class instead
  • "date" was automatically required

The current state is pretty much misleading.

This also happens in JRuby, so I guess somehow this is an intended behavior, but it doesn't make any sense to me.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0