Notes posted by evilguc
RSS feed![Default_avatar_30](https://www.gravatar.com/avatar/b3f0f92586e465ebe4608eaad3e79bbb?default=http://apidock.com/images/default_avatar_30.png&size=30)
2 thanks
everything is ok
Olefine, I’m not sure here is a good place for such questions (better use stackoverflow for example), but answer for your question is that Rails provide slice (and many other methods) not only for Hash class but for HashWithIndifferentAccess too such as for any other superclass of Hash, so they use
hash = self.class.new
for a reason. {} is a literal only for Hash.