Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
FooBarWidget
· 13y ago · 0 comments
Early versions of Rails explicitly made the decision to never symbolize user inputted hashes because symbols are never garbage collected. This would allow memory to grow unbounded. As a result Rails stores all user hash keys as strings.
Comments
[–]
phillc
13y ago
Thank you... I always wondered why that was true.
[–]
peterwoo
13y ago
So it's just serendipitous that this isn't the obvious and massive vulnerability it initially seemed to be.
[–]
alxndr
13y ago
Ah, I also wondered about that. Is that why HashWithIndifferentAccess uses strings internally?