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 8914725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:47:45+00:00 2026-06-15T04:47:45+00:00

Koan code, number 75: in_ruby_version(mri) do RubyConstant = What is the sound of one

  • 0

Koan code, number 75:

      in_ruby_version("mri") do
        RubyConstant = "What is the sound of one hand clapping?"
        def test_constants_become_symbols
          all_symbols = Symbol.all_symbols

          assert_equal __, all_symbols.include?(__)
        end
      end

I’m a bit confused with it because I’ve just found that any symbol tested against the “all_symbols.include?(__)” will match “true”. For example, all of the following should work:

    assert_equal true, all_symbols.include?(:RubyConstant)
    assert_equal true, all_symbols.include?(:"What is the sound of one hand clapping?")
    assert_equal true, all_symbols.include?(:AnythingElseYouCouldWriteHere)

What is it to learn with “constants_become_symbols” at all?

  • 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-06-15T04:47:47+00:00Added an answer on June 15, 2026 at 4:47 am

    In ruby, variables that start with capital letters become constants. The goal of the koan is to teach you that constants become symbols in ruby and get added to the ruby’s symbols table.

    in_ruby_version("mri") do
      RubyConstant = "What is the sound of one hand clapping?"
      def test_constants_become_symbols
        all_symbols = Symbol.all_symbols
    
        assert_equal true, all_symbols.include?("RubyConstant".to_sym)
      end
    end
    

    Also notice how it says "RubyConstant".to_sym instead of :RubyConstant. It’s to avoid confusion since the ruby interpreter will automatically create a symbol when it parses a ruby function, as explained here.

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

Sidebar

Related Questions

In the about_symbols.rb Ruby Koan (https://github.com/edgecase/ruby_koans), I have the following code: RubyConstant = What
Not to sound like a koan, but just wondering if there are definite rules
I am doing the python koan (for python 2.6) and ecnountered something I don't
Probably a sign of an amateur that I'm wondering if the problem's the koan
I am working through Ruby Koans. The test_the_shovel_operator_modifies_the_original_string Koan in about_strings.rb includes the following
I came up with the following solution for a koan. # and # about_triangle_project_2.rb
I am a newbie and seeking for the Zen of Python :) Today's koan
I am working on the solution for this koan , which states: Write a
I'm working on the solution to this koan . I'm stumped as to why
I am using Ubuntu-11.04 OS. i wrote a basic interactive kernel module mid.c #include<linux/kernel.h>

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.