Ruby documentation as I learn it. PR's to the documentation are welcome.
Input/output is similar to Python, Bash, and C.
word = gets
puts "Hello, World!"
The worst part in any language.
Luckily, strings in Ruby can be manipulated similarly to Python via square bracket indexing (i.e. [i]
). For example:
% ruby
word = gets
puts word[0]
^D
lol
l