diff options
| author | Andrew Konchin <andry.konchin@gmail.com> | 2025-03-26 19:56:40 +0200 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2025-03-27 11:09:24 +0100 |
| commit | bac22c985ecc7e4309b5b5e5ae1074c81319e889 (patch) | |
| tree | 5c164d3ed99240737205068f612d47496487758e /spec/ruby/core/io | |
| parent | 53a930f1570c81d2f7829f932e8d7ad67e8462b8 (diff) | |
Update to ruby/spec@5e579e2
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12984
Diffstat (limited to 'spec/ruby/core/io')
| -rw-r--r-- | spec/ruby/core/io/external_encoding_spec.rb | 10 | ||||
| -rw-r--r-- | spec/ruby/core/io/internal_encoding_spec.rb | 10 | ||||
| -rw-r--r-- | spec/ruby/core/io/readpartial_spec.rb | 10 | ||||
| -rw-r--r-- | spec/ruby/core/io/write_nonblock_spec.rb | 2 |
4 files changed, 13 insertions, 19 deletions
diff --git a/spec/ruby/core/io/external_encoding_spec.rb b/spec/ruby/core/io/external_encoding_spec.rb index 2fcf1c7218..7765c6c0f5 100644 --- a/spec/ruby/core/io/external_encoding_spec.rb +++ b/spec/ruby/core/io/external_encoding_spec.rb @@ -94,12 +94,10 @@ describe "IO#external_encoding" do rm_r @name end - ruby_version_is '3.1' do - it "can be retrieved from a closed stream" do - io = IOSpecs.io_fixture("lines.txt", "r") - io.close - io.external_encoding.should equal(Encoding.default_external) - end + it "can be retrieved from a closed stream" do + io = IOSpecs.io_fixture("lines.txt", "r") + io.close + io.external_encoding.should equal(Encoding.default_external) end describe "with 'r' mode" do diff --git a/spec/ruby/core/io/internal_encoding_spec.rb b/spec/ruby/core/io/internal_encoding_spec.rb index 60afaf2ebd..7a583d4bcb 100644 --- a/spec/ruby/core/io/internal_encoding_spec.rb +++ b/spec/ruby/core/io/internal_encoding_spec.rb @@ -113,12 +113,10 @@ describe "IO#internal_encoding" do Encoding.default_internal = @internal end - ruby_version_is '3.1' do - it "can be retrieved from a closed stream" do - io = IOSpecs.io_fixture("lines.txt", "r") - io.close - io.internal_encoding.should equal(Encoding.default_internal) - end + it "can be retrieved from a closed stream" do + io = IOSpecs.io_fixture("lines.txt", "r") + io.close + io.internal_encoding.should equal(Encoding.default_internal) end describe "with 'r' mode" do diff --git a/spec/ruby/core/io/readpartial_spec.rb b/spec/ruby/core/io/readpartial_spec.rb index 0852f20b2d..547da0677d 100644 --- a/spec/ruby/core/io/readpartial_spec.rb +++ b/spec/ruby/core/io/readpartial_spec.rb @@ -93,12 +93,10 @@ describe "IO#readpartial" do @rd.readpartial(0).should == "" end - ruby_bug "#18421", ""..."3.0.4" do - it "clears and returns the given buffer if the length argument is 0" do - buffer = +"existing content" - @rd.readpartial(0, buffer).should == buffer - buffer.should == "" - end + it "clears and returns the given buffer if the length argument is 0" do + buffer = +"existing content" + @rd.readpartial(0, buffer).should == buffer + buffer.should == "" end it "preserves the encoding of the given buffer" do diff --git a/spec/ruby/core/io/write_nonblock_spec.rb b/spec/ruby/core/io/write_nonblock_spec.rb index c403c864fd..5bfc690f9b 100644 --- a/spec/ruby/core/io/write_nonblock_spec.rb +++ b/spec/ruby/core/io/write_nonblock_spec.rb @@ -43,7 +43,7 @@ platform_is_not :windows do it "checks if the file is writable if writing zero bytes" do -> { - @readonly_file.write_nonblock("") + @readonly_file.write_nonblock("") }.should raise_error(IOError) end end |
