

1 s=".sdrawkcab si gnirts sihT"
2 puts s.reverse #This string is backwards.
3 puts s #.sdrawkcab si gnirts sihT
4 s.reverse!
5 puts s #This string is backwards.
6
7 puts "Three little words".split(/\s+/)
8 #Three
9 #little
10 #words
11
12 puts "Three little words".split(/(\s+)/)
13 #Three
14 #
15 #little
16 #
17 #words