Skip to content

Commit 20924bb

Browse files
authored
Set IO::Stapled.pipe blocking args to nil, same as IO.pipe (#15925)
The `IO.pipe` blocking arguments are now nil by default, so the event loop can configure the system fd or handle as per its own requirements, but `IO::Stapled.pipe` was overlooked.
1 parent edc2cc6 commit 20924bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/io/stapled.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class IO::Stapled < IO
107107
#
108108
# Both endpoints and the underlying `IO`s are closed after the block
109109
# (even if `sync_close?` is `false`).
110-
def self.pipe(read_blocking : Bool = false, write_blocking : Bool = false, &)
110+
def self.pipe(read_blocking : Bool? = nil, write_blocking : Bool? = nil, &)
111111
IO.pipe(read_blocking, write_blocking) do |a_read, a_write|
112112
IO.pipe(read_blocking, write_blocking) do |b_read, b_write|
113113
a, b = new(a_read, b_write, true), new(b_read, a_write, true)
@@ -123,7 +123,7 @@ class IO::Stapled < IO
123123

124124
# Creates a pair of bidirectional pipe endpoints connected with each other
125125
# and returns them in a `Tuple`.
126-
def self.pipe(read_blocking : Bool = false, write_blocking : Bool = false) : {self, self}
126+
def self.pipe(read_blocking : Bool? = nil, write_blocking : Bool? = nil) : {self, self}
127127
a_read, a_write = IO.pipe(read_blocking, write_blocking)
128128
b_read, b_write = IO.pipe(read_blocking, write_blocking)
129129
return new(a_read, b_write, true), new(b_read, a_write, true)

0 commit comments

Comments
 (0)