Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6341011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:56:42+00:00 2026-05-24T19:56:42+00:00

I am new to ruby but nonetheless I have installed various versions of Ruby

  • 0

I am new to ruby but nonetheless I have installed various versions of Ruby using RVM,
Here’s the the output of my LOAD_PATH

ruby-1.9.2-p136 :001 > puts $LOAD_PATH
/home/jose/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1
/home/jose/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/i686-linux
/home/jose/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby
/home/jose/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/vendor_ruby/1.9.1
/home/jose/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/vendor_ruby/1.9.1/i686-linux
/home/jose/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/vendor_ruby
/home/jose/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1
/home/jose/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/i686-linux

Ok. So the question here is, Where within these directories can I see the source code for classes like Array, or Time ? (I know, it’s an extremely n00b question, but I need to know.)

I’ve been needing to take a look at the source of Array for a long time.

Thanks in advance!

PS. Which class do you recommend looking at if I want to become a better ruby programmer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:56:42+00:00Added an answer on May 24, 2026 at 7:56 pm

    The coolest gadget for code browsing I found so far is pry:
    http://pry.github.com/

    It’s an irb replacement with a lot of goodies. An example session so you can see how you can browse code with it (and you’ll also see that it can show the C-implementation of a class):

    > pry
    pry(main)> show-
    show-command  show-doc      show-input    show-method   show-source
    pry(main)> show-source Array
    
    From: object.c in Ruby Core (C Method):
    Number of lines: 6
    
    static VALUE
    rb_f_array(obj, arg)
        VALUE obj, arg;
    {
        return rb_Array(arg);
    }
    pry(main)> cd Array
    pry(Array):1> show-source each
    
    From: array.c in Ruby Core (C Method):
    Number of lines: 12
    
    VALUE
    rb_ary_each(ary)
        VALUE ary;
    {
        long i;
    
        RETURN_ENUMERATOR(ary, 0, 0);
        for (i=0; i<RARRAY(ary)->len; i++) {
        rb_yield(RARRAY(ary)->ptr[i]);
        }
        return ary;
    }
    pry(Array):1>
    

    Pry can of course also list the Ruby source of classes.

    Another useful tool for browsing the C-source for Ruby is the Ruby code cross reference:
    http://rxr.whitequark.org/

    However right now it seems to be down, but hopefully it will be up again soon.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not sure why I'm getting this, but I just installed RVM, the new Ruby
I do not have problem as such but I am quite new to Ruby.
I'm using the C extension methods to create a new ruby array, but RARRAY_LEN
New to both Ruby and Rails but I'm book educated by now (which apparently
I am new to Ruby on Rails, I have completed the Blog Tutorial .
I'm new Ruby but been a .net dev for many a year. I want
I'm pretty new to Ruby/Rails but I was taking a look at bundler and
I'm pretty experienced with Perl and Ruby but new to Python so I'm hoping
I am a new Ruby on Rails user and had a question. I have
I'm totally new to Ruby but not to programming. All I did was going

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.