Skip to content

Commit 7ca19b7

Browse files
authored
Merge pull request #2710 from ksss/io-wait
Remove sig for IO#{ready?,nread}
2 parents 52ab7ba + 4837d6c commit 7ca19b7

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

core/io/wait.rbs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
%a{annotate:rdoc:skip}
22
class IO
3-
# <!--
4-
# rdoc-file=ext/io/wait/wait.c
5-
# - io.nread -> int
6-
# -->
7-
# Returns number of bytes that can be read without blocking. Returns zero if no
8-
# information available.
9-
#
10-
# You must require 'io/wait' to use this method.
11-
#
12-
def nread: () -> Integer
13-
14-
# <!--
15-
# rdoc-file=ext/io/wait/wait.c
16-
# - io.ready? -> truthy or falsy
17-
# -->
18-
# Returns a truthy value if input available without blocking, or a falsy value.
19-
#
20-
# You must require 'io/wait' to use this method.
21-
#
22-
def ready?: () -> boolish
23-
243
# <!--
254
# rdoc-file=ext/io/wait/wait.c
265
# - io.wait(events, timeout) -> event mask, false or nil

test/stdlib/IO_test.rb

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -525,26 +525,6 @@ class IOWaitTest < Test::Unit::TestCase
525525

526526
testing "::IO"
527527

528-
def test_readyp
529-
# This method returns true|false in Ruby 2.7, nil|IO in 3.0, and true|false in 3.1.
530-
531-
IO.pipe.tap do |r, w|
532-
assert_send_type(
533-
"() -> untyped",
534-
r, :ready?
535-
)
536-
end
537-
538-
IO.pipe.tap do |r, w|
539-
w.write("hello")
540-
541-
assert_send_type(
542-
"() -> untyped",
543-
r, :ready?
544-
)
545-
end
546-
end
547-
548528
def test_wait_readable
549529
if_ruby "3.0.0"..."3.2.0" do
550530
IO.pipe.tap do |r, w|
@@ -583,15 +563,6 @@ def test_wait_writable
583563
end
584564
end
585565

586-
def test_nread
587-
IO.pipe.tap do |r, w|
588-
assert_send_type(
589-
"() -> Integer",
590-
r, :nread
591-
)
592-
end
593-
end
594-
595566
def test_wait
596567
if_ruby "3.0.0"..."3.2.0", skip: false do
597568
IO.pipe.tap do |r, w|

0 commit comments

Comments
 (0)