diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-12-04 19:36:30 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-12-04 19:36:30 +0900 |
commit | e666bd1c5a595ab64faee00b3744b3bfa591acb1 (patch) | |
tree | 0b9aab08f52a5d195ef61e651072a5e35028da6a /spec | |
parent | b06ffce4aef002dc47c3c5968181230e7ab8d7cc (diff) |
Skip subclass spec with SortedSet
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/library/set/enumerable/to_set_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/ruby/library/set/enumerable/to_set_spec.rb b/spec/ruby/library/set/enumerable/to_set_spec.rb index 0f5504fef2..3790d8deee 100644 --- a/spec/ruby/library/set/enumerable/to_set_spec.rb +++ b/spec/ruby/library/set/enumerable/to_set_spec.rb @@ -7,10 +7,12 @@ describe "Enumerable#to_set" do {a: 1, b: 2}.to_set.should == Set[[:b, 2], [:a, 1]] end - it "allows passing an alternate class for Set" do - sorted_set = [1, 2, 3].to_set(SortedSet) - sorted_set.should == SortedSet[1, 2, 3] - sorted_set.instance_of?(SortedSet).should == true + ruby_version_is ''...'3.0' do + it "allows passing an alternate class for Set" do + sorted_set = [1, 2, 3].to_set(SortedSet) + sorted_set.should == SortedSet[1, 2, 3] + sorted_set.instance_of?(SortedSet).should == true + end end it "passes down passed blocks" do |