Embed comment into source code. in RubyEmbed comment into source code.
# handles string after # as comments.
# can be written after statement like function, assigning variable, etc...
To write multiline comment, use =begin and =end.
NOTE: =begin and =end must be written at beginning of line
#!/usr/bin/ruby # one line comment puts "one line comment can be written after statement" # one line comment =begin This comment style can be written in multi lines like this line 1 line 2 !!! NOTE !!! "=begin" and "=end" must be written at beginning of line =end
$ ruby comment.rb one line comment can be written after statement