Skip to content

"Invalid yield" error in ERB files on ruby 3.3.0 #319

@mloughran

Description

@mloughran

Formatting any ERB file containing <%= yield %> (as is customary in a template) returns an error on ruby 3.3.0:

% ruby -v ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23] % rufo -v rufo 0.17.0 % cat test.erb <%= yield %> % rufo test.erb test.erb:1 Invalid yield % echo $? 1 

but worked fine on ruby 3.2.2:

% ruby -v ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23] % rufo -v rufo 0.17.0 % cat test.erb <%= yield %> % rufo test.erb % echo $? 0 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions