TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ruby Tricks

74 pointsby franzunixover 9 years ago

6 comments

code_sterlingover 9 years ago
A 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.
评论 #10486577 未加载
评论 #10488404 未加载
stewbrewover 9 years ago
I was hoping for something like "static code analysis" and "make code more robust", not for "magic" and "even more magic".
评论 #10488572 未加载
评论 #10486922 未加载
fphilipeover 9 years ago
One very obscure trick in ruby is the flip-flop operator. Never used it and I probably never will. There&#x27;s an open issue to get rid of it[1]. Has anyone ever had a real use case for it?<p>[1]: <a href="https:&#x2F;&#x2F;bugs.ruby-lang.org&#x2F;issues&#x2F;5400" rel="nofollow">https:&#x2F;&#x2F;bugs.ruby-lang.org&#x2F;issues&#x2F;5400</a>
评论 #10486733 未加载
siversover 9 years ago
Thanks for sharing this. Love this format. Learned about PStore, cycle, take, fetch, securerandom, and more. May add to it.<p>Tweeted:<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;sivers&#x2F;status&#x2F;660875966466514944" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;sivers&#x2F;status&#x2F;660875966466514944</a>
评论 #10488685 未加载
_db4zover 9 years ago
Awesome initiative! Already sent my PR :)
评论 #10488431 未加载
buzzdenverover 9 years ago
Sent a PR with a couple of fixes.
评论 #10486572 未加载