Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Ex-Perl coders: Howz it feel to convert to Ruby?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Joel VanderWerf  
View profile  
 More options Sep 15 2004, 5:20 pm
Newsgroups: comp.lang.ruby
From: Joel VanderWerf <vj...@PATH.Berkeley.EDU>
Date: Thu, 16 Sep 2004 06:20:24 +0900
Local: Wed, Sep 15 2004 5:20 pm
Subject: Re: Ex-Perl coders: Howz it feel to convert to Ruby?

Brian Wisti wrote:
>>Or in irb:
>>  > Array.methods.sort

<snip>

> This is one of those situations where I kinda miss Python and its
> ability to store and later display the docstring of a function or class
>  when requested.

> One thing at a time, I suppose.

Why bloat the ruby executable with docstrings when you can easily add ri
to irb? After all, irb is where you want to access the docs. Here's the
relevant part of my .irbrc:

def ri arg
   puts `ri #{arg}`
end

class Module
   def ri(meth=nil)
     if meth
       if instance_methods(false).include? meth.to_s
         puts `ri #{self}##{meth}`
       end
     else
       puts `ri #{self}`
     end
   end
end


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google