Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Commit f1b8322

Browse files
committedNov 7, 2023
Fix tests
1 parent 233db7e commit f1b8322

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

Diff for: ‎lib/async/io/stream.rb

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ def peek(size = nil)
139139
until (block_given? && yield(@read_buffer)) or @eof
140140
fill_read_buffer
141141
end
142+
return @read_buffer
142143
end
143144

144145
def gets(separator = $/, **options)

Diff for: ‎spec/async/io/stream_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
io.write "Hello World"
201201
io.seek(0)
202202

203-
expect(subject.io).to receive(:read_nonblock).and_call_original.once
203+
expect(subject.io).to receive(:read_nonblock).and_call_original.twice
204204

205205
expect(subject.peek(4)).to be == "Hell"
206206
expect(subject.read_partial(4)).to be == "Hell"

0 commit comments

Comments
 (0)