summaryrefslogtreecommitdiff
path: root/spec/ruby/core/unboundmethod/protected_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2023-05-29 15:27:57 +0200
committerBenoit Daloze <eregontp@gmail.com>2023-05-29 15:27:57 +0200
commitc48d496e8cfdf8243d2beb28623954003adaf7fc (patch)
tree2d53327b3126360ccb42f9dae9889b7f329ad035 /spec/ruby/core/unboundmethod/protected_spec.rb
parent98f500d0958d12b1909f4638abf33682d75f3fe6 (diff)
Update to ruby/spec@c3677cf
Diffstat (limited to 'spec/ruby/core/unboundmethod/protected_spec.rb')
-rw-r--r--spec/ruby/core/unboundmethod/protected_spec.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/ruby/core/unboundmethod/protected_spec.rb b/spec/ruby/core/unboundmethod/protected_spec.rb
index db00e7ef43..0c215d8638 100644
--- a/spec/ruby/core/unboundmethod/protected_spec.rb
+++ b/spec/ruby/core/unboundmethod/protected_spec.rb
@@ -1,8 +1,8 @@
require_relative '../../spec_helper'
require_relative 'fixtures/classes'
-ruby_version_is "3.1"..."3.2" do
- describe "UnboundMethod#protected?" do
+describe "UnboundMethod#protected?" do
+ ruby_version_is "3.1"..."3.2" do
it "returns false when the method is public" do
obj = UnboundMethodSpecs::Methods.new
obj.method(:my_public_method).unbind.protected?.should == false
@@ -18,4 +18,11 @@ ruby_version_is "3.1"..."3.2" do
obj.method(:my_private_method).unbind.protected?.should == false
end
end
+
+ ruby_version_is "3.2" do
+ it "has been removed" do
+ obj = UnboundMethodSpecs::Methods.new
+ obj.method(:my_protected_method).unbind.should_not.respond_to?(:protected?)
+ end
+ end
end