summaryrefslogtreecommitdiff
path: root/spec/ruby/core/enumerable/chunk_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-04-27 18:53:23 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-04-27 18:53:23 +0200
commita1b4816759418ca8fe510e8739622fc5d77ab0f0 (patch)
tree9d4fb6091d0086817f5bde46bf1150e9130d34fd /spec/ruby/core/enumerable/chunk_spec.rb
parent00c33d9c232ed1a79eda17acd7231ac93caa162b (diff)
Update to ruby/spec@15c9619
Diffstat (limited to 'spec/ruby/core/enumerable/chunk_spec.rb')
-rw-r--r--spec/ruby/core/enumerable/chunk_spec.rb20
1 files changed, 5 insertions, 15 deletions
diff --git a/spec/ruby/core/enumerable/chunk_spec.rb b/spec/ruby/core/enumerable/chunk_spec.rb
index 34fa651b33..3f8a691da5 100644
--- a/spec/ruby/core/enumerable/chunk_spec.rb
+++ b/spec/ruby/core/enumerable/chunk_spec.rb
@@ -6,21 +6,11 @@ describe "Enumerable#chunk" do
ScratchPad.record []
end
- ruby_version_is ""..."2.4" do
- it "raises an ArgumentError if called without a block" do
- lambda do
- EnumerableSpecs::Numerous.new.chunk
- end.should raise_error(ArgumentError)
- end
- end
-
- ruby_version_is "2.4" do
- it "returns an Enumerator if called without a block" do
- chunk = EnumerableSpecs::Numerous.new(1, 2, 3, 1, 2).chunk
- chunk.should be_an_instance_of(Enumerator)
- result = chunk.with_index {|elt, i| elt - i }.to_a
- result.should == [[1, [1, 2, 3]], [-2, [1, 2]]]
- end
+ it "returns an Enumerator if called without a block" do
+ chunk = EnumerableSpecs::Numerous.new(1, 2, 3, 1, 2).chunk
+ chunk.should be_an_instance_of(Enumerator)
+ result = chunk.with_index {|elt, i| elt - i }.to_a
+ result.should == [[1, [1, 2, 3]], [-2, [1, 2]]]
end
it "returns an Enumerator if given a block" do