diff options
Diffstat (limited to 'spec/ruby/core/enumerator/yielder/append_spec.rb')
-rw-r--r-- | spec/ruby/core/enumerator/yielder/append_spec.rb | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/spec/ruby/core/enumerator/yielder/append_spec.rb b/spec/ruby/core/enumerator/yielder/append_spec.rb index 7f7059774d..a36e5d64b6 100644 --- a/spec/ruby/core/enumerator/yielder/append_spec.rb +++ b/spec/ruby/core/enumerator/yielder/append_spec.rb @@ -23,25 +23,13 @@ describe "Enumerator::Yielder#<<" do end context "when multiple arguments passed" do - ruby_version_is '' ... '2.6' do - it "yields the arguments list to the block" do - ary = [] - y = Enumerator::Yielder.new { |*x| ary << x } - y.<<(1, 2) - - ary.should == [[1, 2]] - end - end + it "raises an ArgumentError" do + ary = [] + y = Enumerator::Yielder.new { |*x| ary << x } - ruby_version_is '2.6' do - it "raises an ArgumentError" do - ary = [] - y = Enumerator::Yielder.new { |*x| ary << x } - - -> { - y.<<(1, 2) - }.should raise_error(ArgumentError, /wrong number of arguments/) - end + -> { + y.<<(1, 2) + }.should raise_error(ArgumentError, /wrong number of arguments/) end end end |