File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,17 @@ def h.to_a() end
2525 h . reject { false } . to_a . should == [ [ 1 , 2 ] ]
2626 end
2727
28- ruby_bug "extra states should not be copied" , "2.1" do
29- it "returns Hash instance for subclasses" do
30- HashSpecs ::MyHash [ 1 => 2 , 3 => 4 ] . reject { false } . should be_kind_of ( Hash )
31- HashSpecs ::MyHash [ 1 => 2 , 3 => 4 ] . reject { true } . should be_kind_of ( Hash )
32- end
33-
34- it "taints the resulting hash" do
35- h = new_hash ( :a => 1 ) . taint
36- h . reject { false } . tainted? . should == false
28+ ruby_version_is "2.2" do
29+ context "with extra state" do
30+ it "returns Hash instance for subclasses" do
31+ HashSpecs ::MyHash [ 1 => 2 , 3 => 4 ] . reject { false } . should be_kind_of ( Hash )
32+ HashSpecs ::MyHash [ 1 => 2 , 3 => 4 ] . reject { true } . should be_kind_of ( Hash )
33+ end
34+
35+ it "does not taint the resulting hash" do
36+ h = new_hash ( :a => 1 ) . taint
37+ h . reject { false } . tainted? . should == false
38+ end
3739 end
3840 end
3941
You can’t perform that action at this time.
0 commit comments