We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fd77f39 + 3fb6c06 commit ca45b25Copy full SHA for ca45b25
README.md
@@ -249,6 +249,23 @@ You can generate a PDF or an HTML copy of this guide using
249
# good
250
arr.each { |elem| puts elem }
251
```
252
+* Avoid comparing booleans to boolean constants.
253
+
254
+ ```Ruby
255
+ # bad
256
+ if condition == true
257
258
+ # good
259
+ if condition
260
261
262
+ options[:verbose] = true
263
+ puts "Loading…" unless options[:verbose] == false
264
265
266
+ options[:silent] = false
267
+ puts "Loading…" unless options[:silent]
268
+ ```
269
270
* Never use `then` for multi-line `if/unless`.
271
0 commit comments