[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01981] Time::at

From: "David Douthitt" <DDouthitt@...>
Date: 2000-03-17 18:10:50 UTC
List: ruby-talk #1981
or whatever the right syntax is :-)

The ruby 1.4 manual says this:

at(time) 
Creates the time object at time. The argument time must be either the instance of the Time class or the number, which is considered as seconds since 00:00:00 GMT, January 1, 1970. 

However, this line:

   print ">>>>", at(57827), "\n";

Generates this error:

./ppp-time.rb:105: undefined method `at' for #<Object:0x40181ed4> (NameError)
        from ./ppp-time.rb:102:in `each'
        from ./ppp-time.rb:102

Two things I note - 57827 should be of class "Fixnum" not "Object" right?  Secondly, I get the same error if I send a string to to_i .  What is going on?

I'm trying to convert a string of the seconds since the epoch into a time object.


In This Thread

Prev Next