0 points

What is the difference between Ruby’s Hash and ActiveSupport’s HashWithIndifferentAccess?


dashboard

Mon May 18 2020 19:18:47 GMT+0000 (UTC)

Posted by @ayazahmadtarar

h = HashWithIndifferentAccess.new
h[:my_value] = 'foo'
h['my_value'] #=> will return "foo"
content_copy
https://www.toptal.com/ruby-on-rails/interview-questions

>> Browse more code snippets

more_vert