Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the point is that Array(h) destroys the Hash, whereas [h].flatten will leave it intact, adding another unexpected gotcha to Array().

Array's terrible friend Integer() implicitly crashed my app in production before, so found that interesting to know; not necessarily related to your talk though. :)



[h].flatten on the other hand of course breaks horribly when someone decides that one of the values is meant to hold an array.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: