ruby-changes:60870
From: Nobuyoshi <ko1@a...>
Date: Wed, 22 Apr 2020 22:01:10 +0900 (JST)
Subject: [ruby-changes:60870] 1fe5bffefd (master): Disallow R-assign in endless def
https://git.ruby-lang.org/ruby.git/commit/?id=1fe5bffefd From 1fe5bffefdf799c24f4a0eed97e1ceefc1dc66d6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 22 Apr 2020 18:56:06 +0900 Subject: Disallow R-assign in endless def diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 2f81d72..c471006 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1419,6 +1419,8 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/test_syntax.rb#L1419 assert_valid_syntax('private def inc(x) = x + 1') assert_valid_syntax('private def obj.foo = 42') assert_valid_syntax('private def obj.inc(x) = x + 1') + eval('def self.inc(x) = x + 1 => @x') + assert_equal(:inc, @x) end def test_methoddef_in_cond -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/