Rubynet-announce Digest, Vol 4, Issue 2

Send rubynet-announce mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body ‘help’ to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than “Re: Contents of rubynet-announce digest…”

Today’s Topics:

  1. [ANN] sys-uptime 0.3.0 (Daniel Berger)

Message: 1
Date: Sun, 22 Jun 2003 11:17:59 -0600
From: Daniel Berger
Subject: [ruby-announce] [ANN] sys-uptime 0.3.0
To: rubynet-announce
Content-Type: text/plain; charset=us-ascii; format=flowed

Hi all,

I’m happy to release sys-uptime 0.3.0, a ruby interface that provides
uptime info. Now with OS X support!


require “sys/uptime”

puts "Uptime (days:hours:minutes:seconds): " + Sys::Uptime.uptime


  • Added OS X support - thanks go to Mike Hall for the patch
  • Fixed incorrect values in FreeBSD (again Mike Hall)
  • Added dhms() method, which is an array of 4 elements: day, hour
    minute, second (again Mike Hall)
  • Modified tc_unix.rb test suite to handle OS X, along with a bit
    of minor cleanup
  • Removed VERSION class method. Use the constant instead
  • Separated FreeBSD/OS X source into its own file (freebsd.c).
    The #ifdefs were starting to get too ugly for me



rubynet-announce mailing list

End of rubynet-announce Digest, Vol 4, Issue 2

Sanity rulez! On another note, could you "reverse" the #ifdefs? Put the
"business logic" into an #include module?


   The #ifdefs were starting to get too ugly for me