R
Radley Smith
I've seen a mix between the curly syntax and the normal syntax for
multiline blocks. Which do you prefer?
multiline blocks. Which do you prefer?
Radley Smith said:I've seen a mix between the curly syntax and the normal syntax for
multiline blocks. Which do you prefer?
I've seen a mix between the curly syntax and the normal syntax for
multiline blocks. Which do you prefer?
Radley Smith said:I've seen a mix between the curly syntax and the normal syntax for
multiline blocks. Which do you prefer?
Radley said:I've seen a mix between the curly syntax and the normal syntax for
multiline blocks. Which do you prefer?
That seems like a good idea. Thanks!http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc
I agree with Jim, but don't know if I always follow these rules ;-)
Regards,
Michael
Curly for single line or cases where precedence matters, do-end for
multiline.
I remember a discussion about this some months ago. Maybe you can dig
it
up in the archives.
I realize this particular example is rather contrived, but obviously
these things pop up from time to time in one's code. Is there any
particular reason that do...end blocks were given different precedence
from {...} blocks?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.