> I'm sure I'm misunderstanding something about alias.  For instance, I
> thought this would work:
> 
> alias time Time.now.to_i
> 
> but it's a parse error. I was thinking it would be a shortcut notation
> for Time.now.to_i, but it's not.  can someone enlighten me?

  alias new_name old_method

Gives a second, new name to an already existing method.

Actually, it copies the method, such that you can now make a new
method with the old name in order to override, but you can still
reach the old method (by its new name).

The macro-ish idea you expected, does not exist in Ruby.
There are no macro's at all!

What you want would simply be done like this:

  def time()
    now().to_i()
  end

Bye,
Kero.

+--- Kero ------------------------------ kero / chello.nl ---+
|  Don't split your mentality without thinking twice       |
|                          Proud like a God -- Guano Apes  |
+--- M38c ------- http://members.chello.nl/~k.vangelder ---+