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

  • SEARCH
  • Home
  • 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 7542181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:05:53+00:00 2026-05-30T08:05:53+00:00

I was looking at the Ruby documentation, and am wondering if everything is an

  • 0

I was looking at the Ruby documentation, and am wondering if everything is an object then ‘keywords’ are objects as well, correct? And if so, where are they defined in ruby?

The following page totally confused me caused it showed the object with all the keywords in it, however this is not the official Object that is used by all classes, is this mixed-in somehow from a different class??

http://ruby-doc.org/docs/keywords/1.9/Object.html

I guess there are lots of questions above, the main one is: how do ruby keywords get into ruby?

  • 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-30T08:05:55+00:00Added an answer on May 30, 2026 at 8:05 am

    The keywords are not objects but defined in the parser which can be found in parse.y in the Ruby source. Here’s the relevant part from that file:

    reswords    : keyword__LINE__ | keyword__FILE__ | keyword__ENCODING__
            | keyword_BEGIN | keyword_END
            | keyword_alias | keyword_and | keyword_begin
            | keyword_break | keyword_case | keyword_class | keyword_def
            | keyword_defined | keyword_do | keyword_else | keyword_elsif
            | keyword_end | keyword_ensure | keyword_false
            | keyword_for | keyword_in | keyword_module | keyword_next
            | keyword_nil | keyword_not | keyword_or | keyword_redo
            | keyword_rescue | keyword_retry | keyword_return | keyword_self
            | keyword_super | keyword_then | keyword_true | keyword_undef
            | keyword_when | keyword_yield | keyword_if | keyword_unless
            | keyword_while | keyword_until
            ;
    

    If you want to know more about the Ruby parser, look at the presentation Hacking parse.y from RubyConf 2009 or Parse.y famtour from Ruby Kaigi 2011.

    Also, a lot of the methods that are available everywhere (like e.g. puts) are defined in the Kernel module.

    EDIT: There’s also a list of key words in the documentation, thanks @antinome for pointing that out.

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

Sidebar

Related Questions

What's the best Ruby documentation resource? Some things I'm looking for: Offline Easy to
I have been looking into Ruby and find its keywords until and unless very
I'm looking at the documentation for FileUtils. I'm confused by the following line: FileUtils.cp
I am looking for a Ruby/Rails tool that will help me accomplish the following:
I'm looking at the documentation for Ruby. I'm confused between using %w() or %W()
Hi I was looking into Ruby to actionscript 3 bytecode compilers and found a
I'm looking for Ruby's Active record for PHP. Something that is so simple that
I was looking at the Ruby logging library Logging.logger method and have a question
I'm looking for a Ruby's equivalent of Code Like a Pythonista: Idiomatic Python Desirable
I'm looking for a ruby gem (or rails plugin) which abstracts the details of

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.