From: Mark Volkmann Date: 2006-07-11T06:49:37+09:00 Subject: Re: two Date classes? Ignore my last reply. Logan answered my question. Thanks! On 7/10/06, Mark Volkmann wrote: > On 7/10/06, Tim Pease wrote: > > Simple exercise on my machine ... > > > > $ ruby -v > > ruby 1.8.4 (2005-12-24) [powerpc-linux] > > I'm running > ruby 1.8.4 (2005-12-24) [i386-mswin32] > > > $ ruby -e 'puts Date.methods(false).sort' > > -e:1: uninitialized constant Date (NameError) > > > > $ ruby -r date -e 'Date.methods(false).sort' > > _load > > _parse > > _strptime > > ajd_to_amjd > > ajd_to_jd > > amjd_to_ajd > > > > > > What version of ruby are you running? > > Might you have included Date in an .irbrc file or some other piece of code? > > I have the RUBYOPT environment variable set to rubygems. Quite > possible that does a require on the Date class. However, even if it > does, why do I get extra methods after I do a "require 'date'"> > > > Blessings, > > Tim Pease > > > > On 7/10/06, Mark Volkmann wrote: > > > It seems that there is a Date class in the core library and the > > > standard library. Is this correct? The following code > > > > > > --- > > > > > > core = Date.methods.sort > > > > > > require 'date' > > > std = Date.methods.sort > > > > > > puts "methods in std Date that aren't in core Date" > > > puts std - core > > > > > > --- > > > > > > outputs lots of method names. > > > > > > Pickaxe doesn't document a Date class in the core libraries. > > > Does anybody know why there are two classes named Date in the standard > > > Ruby distribution? > > -- > R. Mark Volkmann > Object Computing, Inc. > -- R. Mark Volkmann Object Computing, Inc.