From: nagachika00@... Date: 2015-11-24T16:03:18+00:00 Subject: [ruby-core:71656] [Ruby trunk - Bug #11663] Segfault when using multiple keywords if the first keyword is invalid Issue #11663 has been updated by Tomoyuki Chikanaga. Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE Backported into `ruby_2_2` branch at r52742. ---------------------------------------- Bug #11663: Segfault when using multiple keywords if the first keyword is invalid https://bugs.ruby-lang.org/issues/11663#change-55061 * Author: Sean MacGahan * Status: Closed * Priority: Normal * Assignee: * ruby -v: 2.2.3 * Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE ---------------------------------------- When loading a method with an invalid keyword (such as one that ends in a question mark), a syntax error occurs as is expected. However, when loading a method with multiple keywords, if the first keyword is invalid then a segmentation fault occurs. ```ruby def foo(arg1?:) end #=> syntax error def foo(arg1?:, arg2) end #=> syntax error (tIDENTIFIER as expected) def foo(arg1:) end #=> no syntax error def foo(arg1:, arg2?:) end #=> syntax error def foo(arg1, arg2?:) end #=> syntax error def foo(arg1?:, arg2:) end #=> segfault def foo(arg1?:, arg2?:) end #=> segfault ``` -- https://bugs.ruby-lang.org/