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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:28:34+00:00 2026-06-12T05:28:34+00:00

When I run ri Hash , the stringify_keys method shows up as an instance

  • 0

When I run ri Hash, the stringify_keys method shows up as an instance method in some of the listings where, each listing appears to be associated with a different gem or gem version.

But when I try calling it from the irb shell, it fails:

irb(main):035:0> h
=> {:this=>"this value", :that=>"that value"}
irb(main):031:0> h.instance_of? Hash
=> true
irb(main):032:0> h.stringify_keys
NoMethodError: undefined method `stringify_keys' for {:this=>"this value", :that=>"that value"}:Hash
        from (irb):32
        from /usr/local/bin/irb:12:in `<main>'

Also, when I run h.methods.sort in IRB, stringify_keys isn’t listed as a method.

Can someone explain this discrepancy? Is it a matter of my environment being outdated or just something I don’t understand about the Ruby documentation?

  • 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-12T05:28:35+00:00Added an answer on June 12, 2026 at 5:28 am

    Rails (via ActiveSupport) monkey patches the stringify_keys method into Hash so you won’t have it in a plain irb session. You can load the core extensions by saying:

    require 'active_support/core_ext'
    

    See the Active Support Core Extensions Guide for details on loading individual monkey patches.

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

Sidebar

Related Questions

I run the following command to link the different files in my project. /opt/gcc-4.7-cilkplus/bin/gcc
I run a pretty typical producer/consumer model on different tasks. Task1: Reads batches of
I trying to call some ejb bean method from tread. and getting error :
I have a hash table where the vast majority of accesses at run-time follow
I've run into an interesting issue.. It seems that ComputeHash() for a HMACSHA256 hash
Looking for some hash function to make string to int mapping with following restrictions.
When I try and run my program I get this warning and some weird
I have this Hash Set code and when I try to run my compile
I am using Java to generate the MD5 hash for some files. I need
document.location.hash= sets the hash to # in the URL. But when I run this

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.