globals/modifier_test.rb

tests/_examples/globals/modifier_test.rb in the metorex repository.

x = nil
x = 99 unless x
puts x
y = 0
y = 42 if true
puts y
z = 10
z = 0 if false
puts z

Output:

99
42
10