diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dee180f8..e7eddf8d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,16 +12,16 @@ jobs: fail-fast: false matrix: os: [ ubuntu, macos, windows ] - ruby: [ 3.2.9, 3.3.9, 3.4.7 ] + ruby: [ 3.2.9, 3.3.10, 3.4.8, 4.0.0 ] mspecopt: [""] rubyopt: [""] exclude: - { os: windows, ruby: 3.2.9 } # 3.2.9 has some issue with file time microseconds include: - { os: windows, ruby: 3.2.8 } # 3.2.9 has some issue with file time microseconds - - { os: ubuntu, ruby: 3.4.7, mspecopt: "--repeat 2" } - - { os: ubuntu, ruby: 3.4.7, rubyopt: "--enable-frozen-string-literal" } - - { os: ubuntu, ruby: 3.4.7, rubyopt: "--parser=parse.y" } + - { os: ubuntu, ruby: 4.0.0, mspecopt: "--repeat 2" } + - { os: ubuntu, ruby: 4.0.0, rubyopt: "--enable-frozen-string-literal" } + - { os: ubuntu, ruby: 4.0.0, rubyopt: "--parser=parse.y" } runs-on: ${{ matrix.os }}-latest steps: @@ -78,5 +78,5 @@ jobs: - uses: actions/checkout@v6 - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.4' + ruby-version: '4.0' - run: bin/rubocop diff --git a/language/magic_comment_spec.rb b/language/magic_comment_spec.rb index f2bf3a08e..90bb83e27 100644 --- a/language/magic_comment_spec.rb +++ b/language/magic_comment_spec.rb @@ -45,10 +45,19 @@ describe "Magic comments" do describe "in stdin" do - it_behaves_like :magic_comments, :locale, -> file { - print_at_exit = fixture(__FILE__, "print_magic_comment_result_at_exit.rb") - ruby_exe(nil, args: "< #{fixture(__FILE__, file)}", options: "-r#{print_at_exit}") - } + ruby_version_is ""..."4.0" do + it_behaves_like :magic_comments, :locale, -> file { + print_at_exit = fixture(__FILE__, "print_magic_comment_result_at_exit.rb") + ruby_exe(nil, args: "< #{fixture(__FILE__, file)}", options: "-r#{print_at_exit}") + } + end + + ruby_version_is "4.0" do + it_behaves_like :magic_comments, :UTF8, -> file { + print_at_exit = fixture(__FILE__, "print_magic_comment_result_at_exit.rb") + ruby_exe(nil, args: "< #{fixture(__FILE__, file)}", options: "-r#{print_at_exit}") + } + end end platform_is_not :windows do diff --git a/library/socket/shared/address.rb b/library/socket/shared/address.rb index 3857a40ce..b548f1eac 100644 --- a/library/socket/shared/address.rb +++ b/library/socket/shared/address.rb @@ -173,7 +173,7 @@ end end - guard -> { platform_is :windows and ruby_bug "#21702", ""..."4.0" } do + guard -> { platform_is :windows and ruby_bug "#21702", ""..."4.1" } do it 'equals address of peer socket' do if @method == :local_address @addr.to_s.should == @b.remote_address.to_s diff --git a/library/socket/unixsocket/recvfrom_spec.rb b/library/socket/unixsocket/recvfrom_spec.rb index 7fa5c9b60..9bb18047c 100644 --- a/library/socket/unixsocket/recvfrom_spec.rb +++ b/library/socket/unixsocket/recvfrom_spec.rb @@ -32,7 +32,7 @@ end end - guard -> { platform_is :windows and ruby_bug "#21702", ""..."4.0" } do + guard -> { platform_is :windows and ruby_bug "#21702", ""..."4.1" } do it "returns an array containing basic information on the client as second element" do @client.send("foobar", 0) sock = @server.accept @@ -54,7 +54,7 @@ end end - guard -> { platform_is :windows and ruby_bug "#21702", ""..."4.0" } do + guard -> { platform_is :windows and ruby_bug "#21702", ""..."4.1" } do it "returns an array containing server's address as second element" do @client.send("", 0) sock = @server.accept @@ -131,7 +131,7 @@ end end - guard -> { platform_is :windows and ruby_bug "#21702", ""..."4.0" } do + guard -> { platform_is :windows and ruby_bug "#21702", ""..."4.1" } do it 'returns an Array containing the data and address information' do @server.recvfrom(5).should == ['hello', ['AF_UNIX', '']] end