Skip to content

rufo broke my code (method receiver was deleted) #357

@aoki1980taichi

Description

@aoki1980taichi

This code

a=(#X
1)

class C
  def f
    [STDOUT].each{ |elem| elem.puts [
        2
      ]
    }
  end
end
(C.new).f

is formatted to

a = ( #X
  1)

class C
  def f
    [STDOUT].each { |elem|
.puts [
        2,
                ]
    }
  end
end

(C.new).f

which is not a valid Ruby code. ("elem.puts" is changed to ".puts")

ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [x86_64-linux-gnu]
rufo 0.18.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions