Using IRB, why are the Date and Time classes loaded automatically, but DateTime is not? I need require 'date' , it does not make sense to me, because I thought that both Date and DateTime used the standard library 'date' ?
ruby-1.9.2-p290 :001 > Date => Date ruby-1.9.2-p290 :002 > Time => Time ruby-1.9.2-p290 :003 > DateTime NameError: uninitialized constant Object::DateTime from (irb):3 from /Users/kamilski81/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>' ruby-1.9.2-p290 :004 > require 'date' => true ruby-1.9.2-p290 :005 > require 'date' => false ruby-1.9.2-p290 :006 > DateTime => DateTime
ruby
Kamilski81 Mar 14 '12 at 15:33 2012-03-14 15:33
source share