Issue #14627 has been updated by nobu (Nobuyoshi Nakada).


I can't reproduce it.

```
$ ruby -v -e 'Class.new.class_eval "def foo(N:)\n end"'
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux-gnu]
Traceback (most recent call last):
	1: from -e:1:in `<main>'
-e:1:in `class_eval': (eval):1: formal argument cannot be a constant (SyntaxError)
def foo(N:)
        ^~
(eval):1: dynamic constant assignment
def foo(N:)
          ^
```

Could you post simple code to reproduce and full message, in text format?

----------------------------------------
Bug #14627: class_eval "def foo(N:)\n end" regression
https://bugs.ruby-lang.org/issues/14627#change-71181

* Author: ViugiNick (Nickolay Viuginov)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Ruby crashes with a segfault in case of `class_eval` defining method with a keyword starts with a capital letter. It seems like it's a regression of one of the latest versions.

---Files--------------------------------
Screenshot from 2018-03-21 18-15-09.png (133 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>