summaryrefslogtreecommitdiff
path: root/spec/ruby/language/send_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language/send_spec.rb')
-rw-r--r--spec/ruby/language/send_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/language/send_spec.rb b/spec/ruby/language/send_spec.rb
index 5e6571893c..c56d5e8c26 100644
--- a/spec/ruby/language/send_spec.rb
+++ b/spec/ruby/language/send_spec.rb
@@ -265,11 +265,12 @@ describe "Invoking a private getter method" do
-> { receiver.call_self_foo_or_equals(6) }.should raise_error(NoMethodError)
end
end
+
ruby_version_is "2.7" do
it "permits self as a receiver" do
receiver = LangSendSpecs::PrivateGetter.new
- -> { receiver.call_self_foo }.should_not raise_error(NoMethodError)
- -> { receiver.call_self_foo_or_equals(6) }.should_not raise_error(NoMethodError)
+ receiver.call_self_foo_or_equals(6)
+ receiver.call_self_foo.should == 6
end
end
end