[rubygems/rubygems] use a one-liner
https://github.com/rubygems/rubygems/commit/46745885e8
This commit is contained in:
parent
e5efa01c7d
commit
7c4431e61c
@ -354,11 +354,7 @@ module Bundler
|
|||||||
def to_bool(value)
|
def to_bool(value)
|
||||||
case value
|
case value
|
||||||
when String
|
when String
|
||||||
if value.match?(/\A(false|f|no|n|0|)\z/i)
|
value.match?(/\A(false|f|no|n|0|)\z/i) ? false : true
|
||||||
false
|
|
||||||
else
|
|
||||||
true
|
|
||||||
end
|
|
||||||
when nil, false
|
when nil, false
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user