Answers

Question and Answer:

  Home  Ruby on Rails Developer

⟩ Tell me the difference between ActiveSupport’s “HashWithIndifferentAccess” and Ruby’s “Hash”?

The “HashWithIndifferentAccess” class will treat symbol keys and string keys as equivalent while the “Hash” class in Ruby will use the stricter = = comparison on keys—an equivalent string key will not retrieve the value for a given symbol key.

 211 views

More Questions for you: