Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions core/io/wait.rbs
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
%a{annotate:rdoc:skip}
class IO
# <!--
# rdoc-file=ext/io/wait/wait.c
# - io.nread -> int
# -->
# Returns number of bytes that can be read without blocking. Returns zero if no
# information available.
#
# You must require 'io/wait' to use this method.
#
def nread: () -> Integer

# <!--
# rdoc-file=ext/io/wait/wait.c
# - io.ready? -> truthy or falsy
# -->
# Returns a truthy value if input available without blocking, or a falsy value.
#
# You must require 'io/wait' to use this method.
#
def ready?: () -> boolish

# <!--
# rdoc-file=ext/io/wait/wait.c
# - io.wait(events, timeout) -> event mask, false or nil
Expand Down
29 changes: 0 additions & 29 deletions test/stdlib/IO_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -458,26 +458,6 @@ class IOWaitTest < Test::Unit::TestCase

testing "::IO"

def test_readyp
# This method returns true|false in Ruby 2.7, nil|IO in 3.0, and true|false in 3.1.

IO.pipe.tap do |r, w|
assert_send_type(
"() -> untyped",
r, :ready?
)
end

IO.pipe.tap do |r, w|
w.write("hello")

assert_send_type(
"() -> untyped",
r, :ready?
)
end
end

def test_wait_readable
if_ruby "3.0.0"..."3.2.0" do
IO.pipe.tap do |r, w|
Expand Down Expand Up @@ -516,15 +496,6 @@ def test_wait_writable
end
end

def test_nread
IO.pipe.tap do |r, w|
assert_send_type(
"() -> Integer",
r, :nread
)
end
end

def test_wait
if_ruby "3.0.0"..."3.2.0", skip: false do
IO.pipe.tap do |r, w|
Expand Down
Loading