diff options
Diffstat (limited to 'spec/ruby/language/block_spec.rb')
-rw-r--r-- | spec/ruby/language/block_spec.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/ruby/language/block_spec.rb b/spec/ruby/language/block_spec.rb index 99366006b0..8a02f61925 100644 --- a/spec/ruby/language/block_spec.rb +++ b/spec/ruby/language/block_spec.rb @@ -317,10 +317,8 @@ describe "A block" do @y.s(0) { 1 }.should == 1 end - ruby_version_is "2.5" do - it "may include a rescue clause" do - eval("@y.z do raise ArgumentError; rescue ArgumentError; 7; end").should == 7 - end + it "may include a rescue clause" do + eval("@y.z do raise ArgumentError; rescue ArgumentError; 7; end").should == 7 end end @@ -333,10 +331,8 @@ describe "A block" do @y.s(0) { || 1 }.should == 1 end - ruby_version_is "2.5" do - it "may include a rescue clause" do - eval('@y.z do || raise ArgumentError; rescue ArgumentError; 7; end').should == 7 - end + it "may include a rescue clause" do + eval('@y.z do || raise ArgumentError; rescue ArgumentError; 7; end').should == 7 end end @@ -364,10 +360,8 @@ describe "A block" do @y.s([1, 2]) { |a| a }.should == [1, 2] end - ruby_version_is "2.5" do - it "may include a rescue clause" do - eval('@y.s(1) do |x| raise ArgumentError; rescue ArgumentError; 7; end').should == 7 - end + it "may include a rescue clause" do + eval('@y.s(1) do |x| raise ArgumentError; rescue ArgumentError; 7; end').should == 7 end end |