1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Allow calling a private accessor with self.

[Feature #11297] [Feature #16123]
This commit is contained in:
Nobuyoshi Nakada 2019-09-20 02:17:58 +09:00
parent d583df5259
commit e6378cdcd8
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
Notes: git 2019-09-20 03:25:06 +09:00
4 changed files with 11 additions and 9 deletions

View file

@ -269,6 +269,7 @@ describe "Invoking a private getter method" 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)
end
end
end