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
22 changes: 5 additions & 17 deletions core/hash/transform_keys_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,12 @@
@hash.should == { b: 1, c: 2, d: 3, e: 4 }
end

ruby_version_is ""..."3.0.2" do # https://bugs.ruby-lang.org/issues/17735
it "returns the processed keys if we break from the block" do
@hash.transform_keys! do |v|
break if v == :c
v.succ
end
@hash.should == { b: 1, c: 2 }
end
end

ruby_version_is "3.0.2" do
it "returns the processed keys and non evaluated keys if we break from the block" do
@hash.transform_keys! do |v|
break if v == :c
v.succ
end
@hash.should == { b: 1, c: 2, d: 4 }
it "returns the processed keys and non evaluated keys if we break from the block" do
@hash.transform_keys! do |v|
break if v == :c
v.succ
end
@hash.should == { b: 1, c: 2, d: 4 }
end

it "keeps later pair if new keys conflict" do
Expand Down
10 changes: 4 additions & 6 deletions core/io/readpartial_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,10 @@
@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
Expand Down