New to Ruby

Hi, I am new to Ruby, albeit I have lots of programming experience on
other scripting languages such as tcl, perl and python.
I think that ruby1.8 is finally comming of age and I am already
falling in love with it, as it seems to have the best of perl and
python.

As a new user, here are my questions:

  1. Is there anything like dir() in python? This function allows you
    to take any object and list all the methods available.
    Thus, dir(“”) would return all the String methods(length, etc) for
    example.

  2. The only English docs (for ruby 1.6( mention that ruby1.8 should
    have the ability to get rid of the perlish way of passing unordered
    named values, but use more of a python syntax perhaps.

    That is, calling a function or method more like:

    def f(t=1,a=2)
    “#{t} #{a}”
    end

    f(a=1)

1 1

Is this possible now? What syntax?

  1. In-line documentation? Are there any guidelines to document
    functions, classes, etc? It seems ruby comes with some form of inline
    docs called RDoc? But I cannot find any docs for it, neither with ri
    nor online.

  2. Is Ruby 64-bit compatible (ie. can it be compiled for Linux64 or
    the Windows64 AMD betas)?

1) Is there anything like dir() in python? This function allows you
to take any object and list all the methods available.
   Thus, dir("") would return all the String methods(length, etc) for
example.

There are the methods Module#{,public_,private_,protected_}instance_methods

For example

       String.instance_methods

Same for Kernel#{,singleton_,public_,private_,protected_}methods

for example

       "".methods

Is this possible now? What syntax?

not yet

3) In-line documentation? Are there any guidelines to document
functions, classes, etc? It seems ruby comes with some form of inline
docs called RDoc? But I cannot find any docs for it, neither with ri
nor online.

If you have 1.8.1, try

   rdoc -h

   ri

and see the document

  ruby-1.8.1/lib/rdoc/README

4) Is Ruby 64-bit compatible (ie. can it be compiled for Linux64 or
the Windows64 AMD betas)?

  no problem with sparcv9 and ia64

Guy Decoux