rufo 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c3067349b8d78ecb9c824cb5ffd701e036532ff
4
- data.tar.gz: 27c3b81f7a251b93d318dd84fed77b136dbcb420
3
+ metadata.gz: 9cc7fa507501bfbb27524a614b174159b7a17377
4
+ data.tar.gz: 67707c870209d8953530c65b5dd3c53f6c18111b
5
5
  SHA512:
6
- metadata.gz: 2bc69a1bf16c36c68f025a9593c00bc085cfeb004f0fcd2a7faafb2b289f07bd6d4d15d645dcaca7cb5fde6acf8e8c0050a5a0ccb8ccbd0382e853416ce442c3
7
- data.tar.gz: b15595976259d23deeb7e2ef774e527ccfd1c95ef1880cdd6ec4ae05bf60e1e787d0334beaa36b01d7c7e0c1b7e87a9810837e13f860f0314357243a2531e1e4
6
+ metadata.gz: 70c9d2a78691749a6476c1ee9f99a3090111e7ae70c64f0225261ea4722fb3b3c109becc302aef742ed0b5893516a1bb622ca050202392f73a1b7e092a4834b0
7
+ data.tar.gz: f488235e6b8f407aeaac5644e9ba7cbac98bc971d915c6262c92f8792f8480fcfe92fb1b3feb27421775ea8ce9f40154aca84559d1965070a659bba3990e7344
@@ -189,12 +189,12 @@ class Rufo::Formatter
189
189
  visit_suffix(node, "if")
190
190
  when :unless_mod
191
191
  visit_suffix(node, "unless")
192
- when :rescue_mod
193
- visit_suffix(node, "rescue")
194
192
  when :while_mod
195
193
  visit_suffix(node, "while")
196
194
  when :until_mod
197
195
  visit_suffix(node, "until")
196
+ when :rescue_mod
197
+ visit_suffix(node, "rescue")
198
198
  when :vcall
199
199
  # [:vcall, exp]
200
200
  visit node[1]
@@ -617,6 +617,10 @@ class Rufo::Formatter
617
617
  # [:if_mod, cond, body]
618
618
  _, body, cond = node
619
619
 
620
+ if suffix != "rescue"
621
+ body, cond = cond, body
622
+ end
623
+
620
624
  visit body
621
625
  consume_space
622
626
  consume_keyword(suffix)
data/lib/rufo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rufo
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ary Borenszweig