summaryrefslogtreecommitdiff
path: root/spec/ruby/language/class_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language/class_spec.rb')
-rw-r--r--spec/ruby/language/class_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/ruby/language/class_spec.rb b/spec/ruby/language/class_spec.rb
index a91b165ffe..41a9c0f189 100644
--- a/spec/ruby/language/class_spec.rb
+++ b/spec/ruby/language/class_spec.rb
@@ -285,8 +285,12 @@ describe "A class definition extending an object (sclass)" do
}.should raise_error(TypeError)
end
- it "allows accessing the block of the original scope" do
- ClassSpecs.sclass_with_block { 123 }.should == 123
+ 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
it "can use return to cause the enclosing method to return" do