aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/hash
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2022-01-10 16:29:54 +0100
committerBenoit Daloze <eregontp@gmail.com>2022-01-10 16:29:54 +0100
commit4053e8ba0d39b688440fedee2ab3fffabcd64312 (patch)
tree8a29366a09cd159798fada68fb1007a2fece5ec6 /spec/ruby/core/hash
parent8abfc106058d09840d13f64e7e87cb7e40c3d6fa (diff)
downloadruby-4053e8ba0d39b688440fedee2ab3fffabcd64312.tar.gz
Update to ruby/spec@226cfdc
Diffstat (limited to 'spec/ruby/core/hash')
-rw-r--r--spec/ruby/core/hash/to_a_spec.rb10
-rw-r--r--spec/ruby/core/hash/transform_keys_spec.rb4
2 files changed, 12 insertions, 2 deletions
diff --git a/spec/ruby/core/hash/to_a_spec.rb b/spec/ruby/core/hash/to_a_spec.rb
index 46f871389a..6f6f74f73b 100644
--- a/spec/ruby/core/hash/to_a_spec.rb
+++ b/spec/ruby/core/hash/to_a_spec.rb
@@ -36,4 +36,14 @@ describe "Hash#to_a" do
{}.untrust.to_a.untrusted?.should be_true
end
end
+
+ ruby_version_is '2.7'...'3.0' do
+ it "returns a not tainted array if self is tainted" do
+ {}.taint.to_a.tainted?.should be_false
+ end
+
+ it "returns a trusted array if self is untrusted" do
+ {}.untrust.to_a.untrusted?.should be_false
+ end
+ end
end
diff --git a/spec/ruby/core/hash/transform_keys_spec.rb b/spec/ruby/core/hash/transform_keys_spec.rb
index 8ee1a2cd6d..1e82ff6547 100644
--- a/spec/ruby/core/hash/transform_keys_spec.rb
+++ b/spec/ruby/core/hash/transform_keys_spec.rb
@@ -80,7 +80,7 @@ describe "Hash#transform_keys!" do
end
ruby_version_is ""..."3.0.2" do # https://bugs.ruby-lang.org/issues/17735
- it "returns the processed keys if we broke from the block" do
+ it "returns the processed keys if we break from the block" do
@hash.transform_keys! do |v|
break if v == :c
v.succ
@@ -90,7 +90,7 @@ describe "Hash#transform_keys!" do
end
ruby_version_is "3.0.2" do
- it "returns the processed keys and non evaluated keys if we broke from the block" 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