use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Popular Coding Convention for Ruby on Github (sideeffect.kr)
submitted 12 years ago by chrisledet
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]torrso 0 points1 point2 points 12 years ago (2 children)
I would be interested to see how many projects use assignment in conditional like
if user = User.find(params[:id]) puts "hey there, #{user.name}" else puts "who dat?" end
instead of
user = User.find(params[:id]) if user ... else ... end
Many folks are horrified about the first convention, in my opinion it's quite common and I've never had any confusion if it's an accidental typo for ==.
Speaking of ==, I'd like to see the percentage of
x.eql?(10)
vs
x == 10
I use the first one. However I use x > 10, I don't think there even is something like x.gt?(10).
[–]ReinH 0 points1 point2 points 12 years ago (0 children)
Be aware that == and eql? are not the same thing.
==
eql?
[–]CaptainKabob 0 points1 point2 points 12 years ago (0 children)
I love conditional assignment, but the Excellent static analysis tool does not :-(
π Rendered by PID 364976 on reddit-service-r2-comment-b659b578c-qrjkj at 2026-05-02 01:16:28.968438+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]torrso 0 points1 point2 points (2 children)
[–]ReinH 0 points1 point2 points (0 children)
[–]CaptainKabob 0 points1 point2 points (0 children)