From a1b4816759418ca8fe510e8739622fc5d77ab0f0 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 27 Apr 2019 18:53:23 +0200 Subject: Update to ruby/spec@15c9619 --- spec/ruby/core/enumerable/chunk_spec.rb | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'spec/ruby/core/enumerable/chunk_spec.rb') 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 -- cgit v1.2.3