loading
main.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
x = 10
# Notice how this reads like an english sentence
puts 'This appears to be false.' unless x == 4

# This alternative to the while loop better emphasizes the exit condition
x = x - 1 until x == 1
puts x

# It is obvious what this loop will do 
3.times do
  puts 'I am the very model'
  puts 'of a modern major General'
end
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]