Ruby Comments



Ruby Comments

As seen in example Ruby Hello World, comments in ruby are done with pound (#) sign.

#!/usr/bin/ruby
# This is a comment1
# This is a comment2
# This is a comment3

We can have multiple line comments in Ruby as follows using =begin and =end.

#!/usr/bin/ruby
=begin
Ruby comment begins here
Ruby comment  here
Ruby comment  here
Ruby comment ends here
=end





Very informative post. Thanks for taking the time to share your view with us.