Skip to content

Idempotency Failure: Empty Block with Semicolon Body Gets Wrong Whitespace #934

@nicholasdower

Description

@nicholasdower

Originally reported in #915

Commit: 95210d7

Input

→ View on rubyfmt.run

begin
  foo {
    ;
  }
end

Output

→ View on rubyfmt.run

begin
  foo {  }
end

Second Output

begin
  foo { }
end

Expected behavior

The output should be stable.

Found in: bundler 4.0.13 (lib/bundler/vendor/fileutils/lib/fileutils.rb)
Found in: rubygems-update 4.0.13 (bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb)
Found in: net-pop 0.1.2 (lib/net/pop.rb)
Found in: rspec-rspec main (rspec-core/spec/rspec/core/formatters/snippet_extractor_spec.rb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions