I have:

```
line = gets
while line = gets
   print line
end
puts 'out of loop'

```

How do I make line `return nil`?

Please note that on the second line `line=gets` is on purpose, so when `gets=nil`, `line=nil` and the whole condition becomes false.