Skip to content

Commit a16ed42

Browse files
committed
Consistently use #reset_buffering in IO
1 parent 6bb23e2 commit a16ed42

File tree

1 file changed

+2
-2
lines changed
  • src/main/ruby/truffleruby/core

1 file changed

+2
-2
lines changed

src/main/ruby/truffleruby/core/io.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2402,7 +2402,7 @@ def syswrite(data)
24022402
return 0 if data.empty?
24032403

24042404
ensure_open_and_writable
2405-
@ibuffer.unseek!(self) unless @sync
2405+
reset_buffering unless @sync
24062406

24072407
Truffle::POSIX.write_string(self, data, false)
24082408
end
@@ -2478,7 +2478,7 @@ def write_nonblock(data, exception: true)
24782478
data = String data
24792479
return 0 if data.empty?
24802480

2481-
@ibuffer.unseek!(self) unless @sync
2481+
reset_buffering unless @sync
24822482

24832483
self.nonblock = true
24842484

0 commit comments

Comments
 (0)