Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .changeset/ruby-chain-indent-in-hash-block.md

This file was deleted.

16 changes: 16 additions & 0 deletions packages/ruby/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @scalar/ruby-fmt

## 0.7.1

### Patch Changes

- 5c9e6c8: A wrapped method chain inside a block that is a hash value keeps its indentation again. RuboCop 1.84.1 through 1.91 mistake such a chain for the hash value itself and align every continuation line with the receiver, so this, from a lambda per test case:

```ruby
run: -> do
client
.beta
.messages
end
```

came back with `.beta` and `.messages` flush under `client`. A boot-time patch to `Layout/MultilineMethodCallIndentation`, in `src/rubocop-patch.ts`, stops the cop's search for the enclosing hash pair where a block, `begin`, `if` or loop body starts, which restores the indentation RuboCop 1.82 gave these chains. A chain that is itself the hash value is still aligned the way stock RuboCop 1.91 aligns it, and over 1,238 files of real Ruby the patch changes none of them. The status in the README moves from `exact +3 fixes` to `exact +4 fixes`.

## 0.7.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ruby/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scalar/ruby-fmt",
"version": "0.7.0",
"version": "0.7.1",
"description": "Ruby formatter (syntax_tree on CRuby/wasm) - runs on plain Node, no Ruby install",
"keywords": [
"ruby",
Expand Down