Project

General

Profile

Actions

Bug #21714

closed

Prism and parse.y inconsistency in `def a = a b do 1 end`

Bug #21714: Prism and parse.y inconsistency in `def a = a b do 1 end`

Added by tompng (tomoya ishida) 3 months ago. Updated 3 days ago.

Status:
Closed
Assignee:
Target version:
-
ruby -v:
ruby 4.0.0dev (2025-11-26T06:41:42Z master 43ed35de6c) +YJIT +MN +PRISM [arm64-darwin24]
[ruby-core:123916]

Description

Endless method definition and command with block are syntax error in parse.y, accepted in Prism.

def a = a b do 1 end

Related to https://bugs.ruby-lang.org/issues/17398 and https://bugs.ruby-lang.org/issues/21711

Updated by mame (Yusuke Endoh) 3 months ago Actions #1 [ruby-core:124083]

  • Status changed from Open to Assigned
  • Assignee set to prism

Updated by kddnewton (Kevin Newton) 3 days ago Actions #2

  • Status changed from Assigned to Closed

Applied in changeset git|3b6562f663c14d848f8c4f752b5557b8e85d5910.


[ruby/prism] Fix up endless method definition with do/end

[Bug #21714]

https://github.com/ruby/prism/commit/0f47e18335

Actions

Also available in: PDF Atom