On 2/4/06, James Edward Gray II <james / grayproductions.net> wrote:
> On Feb 4, 2006, at 2:57 PM, Mark Volkmann wrote:
>
> > I'm confused about whether the Date class is built-in or in the
> > standard library.
>
> It's a standard library.
>
> > I can use it without requiring it in irb, so that tells me it's
> > built-in.
>
> Na, that tells you that irb requires it somewhere.  :)

Then why does this code run?

d = Date.new
puts "d is a #{d.class}"

This is telling me that there is a built-in Date class and there is
another one in the Standard Library.

ruby-doc.org documents a Date class under both the "Core API" and the
"Standard API". They look very similar, but not identical. As I said
earlier, pickaxe does not document it as a built-in.

Why do there seem to be two Date classes?

--
R. Mark Volkmann
Partner, Object Computing, Inc.