lib/string.rb in rego-ruby-ext-0.0.4 vs lib/string.rb in rego-ruby-ext-0.0.5
- old
+ new
@@ -19,12 +19,12 @@
# converts string to either TrueClass or FalseClass. If converion can't be made, returns nil
def to_boolean
s = self.downcase.strip
if s == 'true'
- TrueClass
+ true
elsif s == 'false'
- FalseClass
+ false
else
nil
end
end