Ruby: Comment

By Xah Lee. Date: . Last updated: .

Line Comment

# this is a comment

Block Comment

=begin
this is a block comment
can be multiple lines
=end

p 3

Block Comment Cannot be Nested

=begin
block comment cannot be nested
=begin
this is error
=end
=end

Ruby, beginner info