diff options
Diffstat (limited to 'spec/ruby/language/class_spec.rb')
-rw-r--r-- | spec/ruby/language/class_spec.rb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/spec/ruby/language/class_spec.rb b/spec/ruby/language/class_spec.rb index 877895bf15..eab3cd0651 100644 --- a/spec/ruby/language/class_spec.rb +++ b/spec/ruby/language/class_spec.rb @@ -308,20 +308,10 @@ describe "A class definition extending an object (sclass)" do -> { class TestClass < BasicObject.new; end }.should raise_error(TypeError, error_msg) end - ruby_version_is ""..."3.0" do - it "allows accessing the block of the original scope" do - suppress_warning do - ClassSpecs.sclass_with_block { 123 }.should == 123 - end - end - end - - ruby_version_is "3.0" do - it "does not allow accessing the block of the original scope" do - -> { - ClassSpecs.sclass_with_block { 123 } - }.should raise_error(SyntaxError) - end + it "does not allow accessing the block of the original scope" do + -> { + ClassSpecs.sclass_with_block { 123 } + }.should raise_error(SyntaxError) end it "can use return to cause the enclosing method to return" do |