mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Endless method definition [Feature #16746]
This commit is contained in:
parent
878e21c6cd
commit
e8f53692ca
Notes:
git
2020-04-10 19:06:24 +09:00
4 changed files with 132 additions and 38 deletions
|
@ -1766,3 +1766,16 @@ describe "An array-dereference method ([])" do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
ruby_version_is '2.8' do
|
||||
describe "An endless method definition" do
|
||||
evaluate <<-ruby do
|
||||
def m(a) = a
|
||||
ruby
|
||||
|
||||
a = b = m 1
|
||||
a.should == 1
|
||||
b.should == 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue