Fix IO#lines deprecation warning for Ruby 2.0