4 ms·
Ruby Tricks
- code_sterling 11y agoA brief explanation of what some of these are doing, or moreover, a use case for why I would want to use them would be handy.
- buzzdenver 11y agoSent a PR with a couple of fixes.
- franzunix 11y agothanks, man!
- fphilipe 11y agoOne very obscure trick in ruby is the flip-flop operator. Never used it and I probably never will. There's an open issue to get rid of it[1]. Has anyone ever had a real use case for it? [1]: https://bugs.ruby-lang.org/issues/5400 https://bugs.ruby-lang.org/issues/5400
- mwpmaybe 11y agoYou've never wanted a range of lines out of a file? It's a common Perl idiom.
- stewbrew 11y agoI was hoping for something like "static code analysis" and "make code more robust", not for "magic" and "even more magic".
- goofed 11y agoAwesome initiative! Already sent my PR :)
- franzunix 11y agothanks, goofed
- sivers 11y agoThanks for sharing this. Love this format. Learned about PStore, cycle, take, fetch, securerandom, and more. May add to it. Tweeted: https://twitter.com/sivers/status/660875966466514944 https://twitter.com/sivers/status/660875966466514944
- franzunix 11y agothanks!