summaryrefslogtreecommitdiff
path: root/spec/ruby/language
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language')
-rw-r--r--spec/ruby/language/method_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/language/method_spec.rb b/spec/ruby/language/method_spec.rb
index 0209ca21c9..bc7b8b6606 100644
--- a/spec/ruby/language/method_spec.rb
+++ b/spec/ruby/language/method_spec.rb
@@ -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