summaryrefslogtreecommitdiff
path: root/include/ruby/fiber
diff options
context:
space:
mode:
authorS-H-GAMELINKS <gamelinks007@gmail.com>2025-07-08 23:14:37 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-07-16 16:17:10 +0900
commitf0649ab46a5235904ea6f9b95aa07cb9375fd463 (patch)
treef58ccc2dcf3f9b1dd8678c9890f6fcc64dfd6593 /include/ruby/fiber
parent54ec48249192325d108355bb8c7d735cd5081617 (diff)
Make `defined? (x;)` return `expression` when using parse.y parser
Follow up [Bug #21029]. Currently, `defined? (x;)` returns `expression` when using Prism parser. See: - https://github.com/ruby/ruby/pull/12949 - https://bugs.ruby-lang.org/issues/21029 However, `defined? (x;)` returns nil when using parse.y, as reported in bug ticket comment and test-all (when using parse.y parser) test result. This change adds a context flag to track trailing semicolons in defined? scope. When a trailing semicolon is detected within a defined? scope, the generated AST node is wrapped with NODE_BLOCK. This change ensures consistent behavior with `defined? (;x)` .
Diffstat (limited to 'include/ruby/fiber')
0 files changed, 0 insertions, 0 deletions