We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 330e0b2 commit 5ac8c5dCopy full SHA for 5ac8c5d
lib/net/sftp/operations/file.rb
@@ -81,7 +81,9 @@ def read(n=nil)
81
# Reads up to the next instance of +sep_string+ in the stream, and
82
# returns the bytes read (including +sep_string+). If +sep_string+ is
83
# omitted, it defaults to +$/+. If EOF is encountered before any data
84
- # could be read, #gets will return +nil+.
+ # could be read, #gets will return +nil+. If the first argument is an
85
+ # integer, or optional second argument is given, the returning string
86
+ # would not be longer than the given value in bytes.
87
def gets(sep_or_limit=$/, limit=Float::INFINITY)
88
if sep_or_limit.is_a? Integer
89
sep_string = $/
0 commit comments