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.
1 parent df61fbb commit b90788fCopy full SHA for b90788f
lib/fog/proxmox/string.rb
@@ -22,8 +22,8 @@ module Proxmox
22
# module String mixins
23
module String
24
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)
+ return true if text == true || text =~ /(true|t|yes|y|1)$/i
+ return false if text == false || text.empty? || text =~ /(false|f|no|n|0)$/i
27
28
raise ArgumentError, "invalid value for Boolean: \"#{text}\""
29
end
0 commit comments