summaryrefslogtreecommitdiff
path: root/lualibs-boolean.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-08-24 04:00:06 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-08-24 04:00:06 -0700
commit3aacbae713dd9a3468578f56a75b74bb378a7de2 (patch)
treec48884db059a75ccab8a419e49983663c1c17ff8 /lualibs-boolean.lua
parentd287bf5f8bc24ad366a3ff8e07dcb93d0f48bd03 (diff)
parent36085526a0d2e5f35d0c6a9fc4daae0b6b69326f (diff)
downloadlualibs-3aacbae713dd9a3468578f56a75b74bb378a7de2.tar.gz
Merge pull request #16 from phi-gamma/master
routine update to latest code
Diffstat (limited to 'lualibs-boolean.lua')
-rw-r--r--lualibs-boolean.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lualibs-boolean.lua b/lualibs-boolean.lua
index f087f1a..8d11080 100644
--- a/lualibs-boolean.lua
+++ b/lualibs-boolean.lua
@@ -59,9 +59,9 @@ end
function string.is_boolean(str,default)
if type(str) == "string" then
- if str == "true" or str == "yes" or str == "on" or str == "t" then
+ if str == "true" or str == "yes" or str == "on" or str == "t" or str == "1" then
return true
- elseif str == "false" or str == "no" or str == "off" or str == "f" then
+ elseif str == "false" or str == "no" or str == "off" or str == "f" or str == "0" then
return false
end
end