mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@519df35
This commit is contained in:
parent
31bb66a19d
commit
1c938a72aa
83 changed files with 1416 additions and 308 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue