First line while (line = gets) would be better Ruby as
while line = gets.
Even Scala 3 has been Rubyfied and suppressed these parentheses ! ![]()
(In Programming Ruby 1.9 2010 edition p.24 there were no parentheses)
Same in Reading and ‘Riting page 30 :
while (line = gets)
print line
end