1
0
Fork 0
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:
Nobuyoshi Nakada 2020-04-01 23:58:02 +09:00
parent 878e21c6cd
commit e8f53692ca
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2020-04-10 19:06:24 +09:00
4 changed files with 132 additions and 38 deletions

View file

@ -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