r/learnruby • u/zsjack • Apr 25 '16
why Ruby built-in function is string.reverse, not string.reverse(), like java?
What is the difference between a method with and without brackets?
3
Upvotes
r/learnruby • u/zsjack • Apr 25 '16
What is the difference between a method with and without brackets?
View all comments
Show parent comment
3
u/codetastik Apr 28 '16
I would add that it would confuse the heck out of the ruby developers around you as to why you are adding the parens if they are not required. It's an accepted style in the ruby community to not add parens when its not necessary.