-
Website
http://paulmwatson.com/journal -
Original page
http://paulmwatson.com/journal/2006/05/09/commenting-in-ruby/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
aidanf
1 comment · 3 points
-
keithbohanna
1 comment · 1 points
-
martinmurphy
1 comment · 1 points
-
jufemaiz
1 comment · 1 points
-
lxsg
1 comment · 1 points
-
-
Popular Threads
# This function adds two numbers together.
# No overflow checking is provided.
def sum(a,b)
a + b
end
It's easier to read and makes the comments more discernible.
Block comments are useful during development.
I agree though, it can be painful after spending years using /* */ comments. IMHO, its one of the very few annoyances I have with ruby.
PS the rectangular select is brilliant, once you start using it, you'll wonder how you ever managed without it!
Thanks
For block comment, you do:
=begin
Your code
=end
I hope you find that useful
Thanks
In Rhtml or ERB I would use :
<!-- -->
Do you have alternatives?