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 +4 -4
- data/lib/rufo/formatter.rb +6 -2
- data/lib/rufo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9cc7fa507501bfbb27524a614b174159b7a17377
|
|
4
|
+
data.tar.gz: 67707c870209d8953530c65b5dd3c53f6c18111b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70c9d2a78691749a6476c1ee9f99a3090111e7ae70c64f0225261ea4722fb3b3c109becc302aef742ed0b5893516a1bb622ca050202392f73a1b7e092a4834b0
|
|
7
|
+
data.tar.gz: f488235e6b8f407aeaac5644e9ba7cbac98bc971d915c6262c92f8792f8480fcfe92fb1b3feb27421775ea8ce9f40154aca84559d1965070a659bba3990e7344
|
data/lib/rufo/formatter.rb
CHANGED
|
@@ -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