# requires Ruby 3.4 or newer
# *** before: ***
squares_old = [1, 2, 3].map { |x| x * x } # a numbered parameter also works: _1
# *** in version 3.4: ***
# in Ruby 3.3 a bare "it" only produced a deprecation warning; it became a
# real implicit block parameter in 3.4, and unlike _1 it also works in
# nested blocks
squares = [1, 2, 3].map { it * it }
puts squares.inspect