Create comments in Ruby, using the # symbol. : Comments « Language Basics « Ruby






Create comments in Ruby, using the # symbol.


# When you use # on a line, everything you place after the # will be ignored by Ruby, although you can read it.

puts "Hello from Ruby." #Display the text!

 








Related examples in the same category

1.What are Comments
2.This block comment conceals several lines from the interpreter with =begin/=end:
3.Some valid examples of commenting in Ruby:
4.Make sure trailing comments are far enough from the code