On Aug 30, 5:08 pm, pharrington <[email protected]> wrote:
> On Aug 30, 4:57 pm, Conrad Taylor <[email protected]> wrote:
>
>
>
> > Hi, here's my results for the various Ruby implementations:
>
> > Ruby 1.8.6:
>
> > >> Time.now
>
> > => Sun Aug 30 13:49:32 -0700 2009>> Time.today
>
> > NoMethodError: undefined method `today' for Time:Class
> > from (irb):2>> Date.today
>
> > => Sun, 30 Aug 2009
>
> > >> quit
>
> > Ruby 1.8.7:
>
> > >> Time.now
>
> > => 2009-08-30 13:51:31 -0700>> Time.today
>
> > NoMethodError: undefined method `today' for Time:Class
> > from (irb):2
> > from /opt/local/bin/irb:12:in `<main>'
>
> > >> quit
>
> > Ruby 1.9.1:
>
> > >> Time.now
>
> > => 2009-08-30 13:54:31 -0700>> Time.today
>
> > NoMethodError: undefined method `today' for Time:Class
> > from (irb):2
> > from /opt/local/bin/irb:12:in `<main>'
>
> > >> quit
>
> > Good luck,
>
> > -Conrad
>
> What does the RUBY_VERSION say?
>
> It looks like you accidentally ran the wrong IRB when testing this
> out, as your Ruby "1.8.7" and 1.9.1 are both the same executable (/opt/
> local/bin/irb).
>
> But Keiran's suggestion isn't bad, might want to work a
> method_defined? in with that though.
And this is me speaking apparently too soon
from my laptop (Kubuntu 9.03)
irb(main):006:0> RUBY_VERSION
=> "1.8.7"
irb(main):007:0> Time.today
NoMethodError: undefined method `today' for Time:Class
from (irb):7
irb(main):008:0>
from my desktop (also Kubuntu 9.03)
>> RUBY_VERSION
=> "1.8.7"
>> Time.today
=> Sun Aug 30 00:00:00 -0400 2009
>>
So a gem must be adding this somewhere, I'm too lazy to look where
right now though
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---