Answers

Question and Answer:

  Home  Ruby Developer

⟩ Tell me what is the difference between Active support’s “HashWithIndifferent” and Ruby’s “Hash” ?

The Hash class in Ruby’s core library returns value by using a standard “= =” comparison on the keys. It means that the value stored for a symbol key cannot be retrieved using the equivalent string. While the HashWithIndifferentAccess treats Symbol keys and String keys as equivalent.

 234 views

More Questions for you: