On Dec 27, 10:49 am, Santanu <thisissant... / gmail.com> wrote:
> On Dec 27, 9:35 pm, Stephen Duncan <stephen.dun... / gmail.com> wrote:
>
> > On Dec 27, 2007 11:24 AM, Santanu <thisissant... / gmail.com> wrote:
> > > However, I am still searching for the exact syntax for asking for help
> > > on say, Array.collect, etc. at the irb prompt. Any pointers?
> > >> help 'Array#collect'
>
> Thanks. That works. By the way, "help 'Array.collect'" works too.
> Are Array.collect and Array#collect equivalent or is this about
> class method vs. instance method. (I don't know ruby that much
> yet. Just started learning it from "Ruby By Example" yesterday).
>
> Regards,
> Santanu

"#" and "." are equivalent, "::" is for class methods (and other
class / module level constants). I started writing my last message
about twenty minutes ago, then my cat got into a bag of wrapping-paper
from Christmas and messed up the living room (that's a bad kitty!), so
I got side-tracked...but I basically tried to demonstrate this
difference with the last two calls to #help in my last message. See
also the source of optparse.rb to see what my examples refer to about
"class nested in a class" and so forth:
http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8/lib/optparse.rb

Regards,
Jordan