# sample program showing special characters like comments
# I'm a comment line
a = 1  #notice no semicolon and no type declaration
b = 2; c = 3 #notice two statements on one line
name = "Abraham \
Lincoln"   # a line continued by trailing \
puts "#{name}"
=begin
I'm ignored.
So am I.
=end
puts "goodbye"
__END__
1
2
3
4
Published in: Ruby
Download

Related snippets