Skip to content

Commit b90788f

Browse files
authored
Fix rubocop errors (#105)
Style/RedundantParentheses: Don't use parentheses around a literal
1 parent df61fbb commit b90788f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/fog/proxmox/string.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ module Proxmox
2222
# module String mixins
2323
module String
2424
def self.to_boolean(text)
25-
return true if text == true || text =~ (/(true|t|yes|y|1)$/i)
26-
return false if text == false || text.empty? || text =~ (/(false|f|no|n|0)$/i)
25+
return true if text == true || text =~ /(true|t|yes|y|1)$/i
26+
return false if text == false || text.empty? || text =~ /(false|f|no|n|0)$/i
2727

2828
raise ArgumentError, "invalid value for Boolean: \"#{text}\""
2929
end

0 commit comments

Comments
 (0)