[ruby-core:94093] [Ruby master Bug#5357] Indentation of nested operators should nest

From: nobu@...
Date: 2019-08-01 08:48:35 UTC
List: ruby-core #94093
Issue #5357 has been updated by nobu (Nobuyoshi Nakada).

Description updated

The ruby-mode.el in Emacs 26 seems to indent as the first example.

----------------------------------------
Bug #5357: Indentation of nested operators should nest
https://bugs.ruby-lang.org/issues/5357#change-80326

* Author: now (Nikolai Weibull)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
* ruby -v: trunk
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Hi!

Currently,

```ruby
return if
  hash.
    values_at(:a, :b, :c).
    reject{ |e| e.nil? or e.empty? }.
    empty?
```

is indented

as

```ruby
return if
  hash.
  values_at(:a, :b, :c).
  reject{ |e| e.nil? or e.empty? }.
  empty?
```

I would prefer it to be indented as in the first example.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next