From b34693810f71e96da231185c7ad24b09a65ade43 Mon Sep 17 00:00:00 2001 From: Kazuki Nishikawa Date: Sat, 18 Mar 2023 17:04:45 +0900 Subject: [PATCH] add reproducible test case for #277 --- .../formatter_source_specs/align_chained_calls.rb.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/lib/rufo/formatter_source_specs/align_chained_calls.rb.spec b/spec/lib/rufo/formatter_source_specs/align_chained_calls.rb.spec index 093ce160..2deab99c 100644 --- a/spec/lib/rufo/formatter_source_specs/align_chained_calls.rb.spec +++ b/spec/lib/rufo/formatter_source_specs/align_chained_calls.rb.spec @@ -268,3 +268,13 @@ context "no sidecar/archive" do .and_return(Uploader::Result.new(success: true)) end end + +#~# ORIGINAL bug_277 +a.map &method(:foo) + .map do |x| x + 1; end + .map { _1 * 2 } + +#~# EXPECTED +a.map &method(:foo) + .map do |x| x + 1; end + .map { _1 * 2 }