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:
parent
d583df5259
commit
e6378cdcd8
Notes:
git
2019-09-20 03:25:06 +09:00
4 changed files with 11 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue