diff --git a/lib/net/sftp/operations/file.rb b/lib/net/sftp/operations/file.rb index d031050..85b1792 100644 --- a/lib/net/sftp/operations/file.rb +++ b/lib/net/sftp/operations/file.rb @@ -92,6 +92,7 @@ def gets(sep_or_limit=$/, limit=Float::INFINITY) sep_string = sep_or_limit lim = limit end + lim = Float::INFINITY if lim.nil? || lim < 0 delim = if sep_string && sep_string.length == 0 "#{$/}#{$/}"