Flowdock

Notes posted by evilguc

RSS feed
August 20, 2013
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.