Skip to content

Commit 8a38f1c

Browse files
committed
Address warning: mismatched indentations at 'else' with 'case'
``` /path/to/sqlite3-ruby/lib/sqlite3/pragmas.rb:26: warning: mismatched indentations at 'else' with 'case' at 23 /path/to/sqlite3-ruby/lib/sqlite3/pragmas.rb:34: warning: mismatched indentations at 'else' with 'case' at 21 ``` These mismatched indentations are corrected by RuboCop as follows. ``` $ rubocop --auto-correct --only Layout/ElseAlignment,Layout/CaseIndentation lib/sqlite3/pragmas.rb ``` https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/63141 relaxed the condition of this warning.
1 parent fab4f11 commit 8a38f1c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

lib/sqlite3/pragmas.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ def get_boolean_pragma( name )
1919
# integer that represents truth.
2020
def set_boolean_pragma( name, mode )
2121
case mode
22-
when String
22+
when String
2323
case mode.downcase
24-
when "on", "yes", "true", "y", "t"; mode = "'ON'"
25-
when "off", "no", "false", "n", "f"; mode = "'OFF'"
26-
else
24+
when "on", "yes", "true", "y", "t"; mode = "'ON'"
25+
when "off", "no", "false", "n", "f"; mode = "'OFF'"
26+
else
2727
raise Exception,
2828
"unrecognized pragma parameter #{mode.inspect}"
2929
end
30-
when true, 1
30+
when true, 1
3131
mode = "ON"
32-
when false, 0, nil
32+
when false, 0, nil
3333
mode = "OFF"
34-
else
34+
else
3535
raise Exception,
3636
"unrecognized pragma parameter #{mode.inspect}"
3737
end

0 commit comments

Comments
 (0)