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
4 changes: 0 additions & 4 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ jobs:
bundler: none
- name: Set working directory as safe
run: git config --global --add safe.directory $(pwd)
- name: Set up permission
run: chmod -R o-w /opt/hostedtoolcache/Ruby
- name: Install dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -90,8 +88,6 @@ jobs:
bundler-cache: none
- name: Set working directory as safe
run: git config --global --add safe.directory $(pwd)
- name: Set up permission
run: chmod -R o-w /opt/hostedtoolcache/Ruby
- name: Install dependencies
run: |
sudo apt-get update
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
bundler: none
- name: Set working directory as safe
run: git config --global --add safe.directory $(pwd)
- name: Set up permission
run: chmod -R o-w /opt/hostedtoolcache/Ruby
- name: Install dependencies
run: |
sudo apt-get update
Expand Down
1 change: 1 addition & 0 deletions test/stdlib/CGI_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ARGV.replace(%w(abc=001 def=002))
assert_send_type "() -> void",
CGI, :new
assert_send_type "(?::String options) -> void",

Check failure on line 14 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

ArgumentError: wrong number of arguments (given 1, expected 0) /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'BasicObject#initialize' /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'Class#new' /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:14:in 'CGISingletonTest#test_new'
CGI, :new, 'html3'
assert_send_type "(?::String options) ?{ (::String name, ::String value) -> void } -> void",
CGI, :new, 'html3' do |name, value| name + value end
Expand All @@ -22,19 +22,19 @@
end

def test_accept_charset
assert_send_type "() -> ::encoding",

Check failure on line 25 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'accept_charset' for class CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:25:in 'CGISingletonTest#test_accept_charset'
CGI, :accept_charset
end

def test_accept_charset=
assert_send_type "(::String accept_charset) -> ::String",

Check failure on line 30 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'accept_charset=' for class CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:30:in 'CGISingletonTest#test_accept_charset='
CGI, :accept_charset=, 'utf-8'
assert_send_type "(::Encoding accept_charset) -> ::Encoding",
CGI, :accept_charset=, Encoding::UTF_8
end

def test_parse
assert_send_type "(::String query) -> ::Hash[::String, String | Array[String]]",

Check failure on line 37 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'parse' for class CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:37:in 'CGISingletonTest#test_parse'
CGI, :parse, 'a=hoge&b=1&c[]=test1&c[]=test2'
end

Expand Down Expand Up @@ -68,6 +68,7 @@
testing "::CGI"

def setup
super
ARGV.replace(%w(abc=001 def=002))
end

Expand All @@ -77,7 +78,7 @@
end

def test_http_header
assert_send_type "() -> ::String",

Check failure on line 81 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'http_header' for an instance of CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:81:in 'CGITest#test_http_header'
CGI.new, :http_header
assert_send_type "(::String options) -> ::String",
CGI.new, :http_header, 'text/csv'
Expand All @@ -88,7 +89,7 @@
end

def test_header
assert_send_type "() -> ::String",

Check failure on line 92 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'header' for an instance of CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:92:in 'CGITest#test_header'
CGI.new, :header
assert_send_type "(::String options) -> ::String",
CGI.new, :header, 'text/csv'
Expand All @@ -99,12 +100,12 @@
end

def test_nph?
assert_send_type "() -> ::boolish",

Check failure on line 103 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'nph?' for an instance of CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:103:in 'CGITest#test_nph?'
CGI.new, :nph?
end

def test_out
assert_send_type "() { () -> void } -> void",

Check failure on line 108 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'out' for an instance of CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:90:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:108:in 'CGITest#test_out'
CGI.new, :out do '' end
assert_send_type "(::String content_type_string) { () -> String } -> void",
CGI.new, :out, 'text/csv' do '' end
Expand All @@ -115,12 +116,12 @@
end

def test_stdinput
assert_send_type "() -> ::IO",

Check failure on line 119 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'stdinput' for an instance of CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:119:in 'CGITest#test_stdinput'
CGI.new, :stdinput
end

def test_stdoutput
assert_send_type "() -> ::IO",

Check failure on line 124 in test/stdlib/CGI_test.rb

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

Error

NoMethodError: undefined method 'stdoutput' for an instance of CGI /home/runner/work/rbs/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup' /home/runner/work/rbs/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type' test/stdlib/CGI_test.rb:124:in 'CGITest#test_stdoutput'
CGI.new, :stdoutput
end
end
1 change: 1 addition & 0 deletions test/stdlib/Forwardable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class SingleForwardableTest < Test::Unit::TestCase
testing "::SingleForwardable"

def setup
super
@tested = Object.new
@tested.extend SingleForwardable
end
Expand Down
3 changes: 2 additions & 1 deletion test/stdlib/Minitest_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ class MinitestTestLifecycleHooksTest < Test::Unit::TestCase

class LifecycleSetup < Minitest::Test
def setup
super
@foo = 123
end
end
end

def test_setup_return_type_void
test = LifecycleSetup.new("setup")
Expand Down
4 changes: 4 additions & 0 deletions test/stdlib/Ractor_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ class RactorInstanceTest < Test::Unit::TestCase
testing "::Ractor"

def test_aref
omit "Accessing ractor local storage" if RUBY_VERSION >= "3.5"

r = Ractor.new {}
r['foo'] = 'bar'
assert_send_type "(String) -> untyped",
Expand All @@ -141,6 +143,8 @@ def test_aref
end

def test_aset
omit "Accessing ractor local storage" if RUBY_VERSION >= "3.5"

r = Ractor.new {}
assert_send_type "(String, String) -> String",
r, :[]=, 'foo', 'bar'
Expand Down
1 change: 1 addition & 0 deletions test/stdlib/uri/rfc2396_parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class URIRFC2396_ParserInstanceTest < Test::Unit::TestCase
testing "::URI::RFC2396_Parser"

def setup
super
@instance = URI::RFC2396_Parser.new
end

Expand Down