Issue #6702 has been updated by kommen (Dieter Komendera).


This is an issue again in Ruby 2.0.0 preview 2 as the require 'date' in rubygems/specification.rb as described in note 6 in this issue was removed again with this commit: https://github.com/rubygems/rubygems/commit/04422c3c7fc0273a5ef9d01641fb0a2a4ee0d03d

I found it to be a backward compatibility issue for example with the compass gem: https://github.com/chriseppstein/compass/blob/stable/compass.gemspec#L6

Should this issue be reopened?

----------------------------------------
Bug #6702: Date should be either required or not
https://bugs.ruby-lang.org/issues/6702#change-34409

Author: rosenfeld (Rodrigo Rosenfeld Rosas)
Status: Closed
Priority: Low
Assignee: drbrain (Eric Hodel)
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


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.


-- 
http://bugs.ruby-lang.org/