summaryrefslogtreecommitdiff
path: root/spec/ruby/language/class_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2023-06-26 15:55:11 +0200
committerBenoit Daloze <[email protected]>2023-06-26 15:55:11 +0200
commit515bd4214497b3af02f6eef51b496ad9a0cf6b3b (patch)
tree4554360d275a3bb9dc696f952b8f3d1bcd88f18a /spec/ruby/language/class_spec.rb
parentf73fa299279ac322bd921691d1ba0e8bf2b39b5f (diff)
Update to ruby/spec@30e1c35
Diffstat (limited to 'spec/ruby/language/class_spec.rb')
-rw-r--r--spec/ruby/language/class_spec.rb18
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