Ruby 2.6 makes infinite loop more readable by changing mandatory second argument in range to optional.
Internally, Ruby changes second argument to nil if second argument is not provided. So, both (0..) and (0..nil) are same in Ruby 2.6.
Using endless loop in Ruby 2.6
In Ruby 2.5, nil is not an acceptable argument and (0..nil) would throw ArgumentError.