From 45cf4f218728a15eb36d14a6c9912086525f5e3f Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Mon, 25 Apr 2022 14:53:54 +0200 Subject: Update to ruby/spec@3affe1e --- spec/ruby/core/enumerator/yielder/to_proc_spec.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'spec/ruby/core/enumerator/yielder/to_proc_spec.rb') diff --git a/spec/ruby/core/enumerator/yielder/to_proc_spec.rb b/spec/ruby/core/enumerator/yielder/to_proc_spec.rb index 0ed1645853..1d3681ab50 100644 --- a/spec/ruby/core/enumerator/yielder/to_proc_spec.rb +++ b/spec/ruby/core/enumerator/yielder/to_proc_spec.rb @@ -1,18 +1,16 @@ require_relative '../../../spec_helper' -ruby_version_is "2.7" do - describe "Enumerator::Yielder#to_proc" do - it "returns a Proc object that takes an argument and yields it to the block" do - ScratchPad.record [] - y = Enumerator::Yielder.new { |*args| ScratchPad << args; "foobar" } +describe "Enumerator::Yielder#to_proc" do + it "returns a Proc object that takes an argument and yields it to the block" do + ScratchPad.record [] + y = Enumerator::Yielder.new { |*args| ScratchPad << args; "foobar" } - callable = y.to_proc - callable.class.should == Proc + callable = y.to_proc + callable.class.should == Proc - result = callable.call(1, 2) - ScratchPad.recorded.should == [[1, 2]] + result = callable.call(1, 2) + ScratchPad.recorded.should == [[1, 2]] - result.should == "foobar" - end + result.should == "foobar" end end -- cgit v1.2.3