Issue #5357 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Assigned to Feedback

=begin
Your first example seems inconsistent, why are the last 3 lines indented at the same column?
It would be:

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

But it doesn't look nice to me.

=end

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

Author: now (Nikolai Weibull)
Status: Feedback
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: misc
Target version: 
ruby -v: trunk


Hi!

Currently,

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

is indented

as

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.


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