Seven lone Time methods

(7rans) #1

Time is a core class of Ruby's. So why do we have to

  require 'time'

in order to gain these seven methods?

   httpdate, iso8601, parse, rfc2822, rfc822, xmlschema, zone_offset

What aren't they already there? (especailly #parse)

Thanks,
T.

(Nobuyoshi Nakada) #2

Hi,

At Mon, 15 Aug 2005 21:16:13 +0900,
Trans wrote in [ruby-talk:152194]:

Time is a core class of Ruby's. So why do we have to

  require 'time'

in order to gain these seven methods?

   httpdate, iso8601, parse, rfc2822, rfc822, xmlschema, zone_offset

What aren't they already there? (especailly #parse)

I guess they are easier in ruby than C.

···

--
Nobu Nakada

(Tanaka Akira) #3

In article <1124107968.821616.16440@f14g2000cwb.googlegroups.com>,
  "Trans" <transfire@gmail.com> writes:

Time is a core class of Ruby's. So why do we have to

  require 'time'

in order to gain these seven methods?

   httpdate, iso8601, parse, rfc2822, rfc822, xmlschema, zone_offset

matz against that a builtin method which name contains RFC number.
[ruby-list:15923]

···

--
Tanaka Akira

(Austin Ziegler) #4

Fair enough, but is there no way to make these available by default,
just the same way that Time is?

-austin

···

On 8/15/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:

At Mon, 15 Aug 2005 21:16:13 +0900,
Trans wrote in [ruby-talk:152194]:
> Time is a core class of Ruby's. So why do we have to
>
> require 'time'
>
> in order to gain these seven methods?
>
> httpdate, iso8601, parse, rfc2822, rfc822, xmlschema, zone_offset
>
> What aren't they already there? (especailly #parse)

I guess they are easier in ruby than C.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

(gabriele renzi) #5

Austin Ziegler ha scritto:

  httpdate, iso8601, parse, rfc2822, rfc822, xmlschema, zone_offset

What aren't they already there? (especailly #parse)

I guess they are easier in ruby than C.

Fair enough, but is there no way to make these available by default,
just the same way that Time is?

actually I'd like to have #parse as builtin, but whay would we need xmlschema or httpdate time extension built-in ?
They make more sense in an extension to me since..

PS
mh well, we could make xml and http libs parte of the core maybe... :wink:

(Nobuyoshi Nakada) #6

Hi,

At Mon, 15 Aug 2005 21:54:05 +0900,
Austin Ziegler wrote in [ruby-talk:152198]:

> > Time is a core class of Ruby's. So why do we have to
> >
> > require 'time'
> >
> > in order to gain these seven methods?
> >
> > httpdate, iso8601, parse, rfc2822, rfc822, xmlschema, zone_offset
> >
> > What aren't they already there? (especailly #parse)
>
> I guess they are easier in ruby than C.

Fair enough, but is there no way to make these available by default,
just the same way that Time is?

One idea I have is extending autoload.

A patch is <http://www.rubyist.net/~nobu/ruby/autoload_method.diff>

···

--
Nobu Nakada