summaryrefslogtreecommitdiff
path: root/lib/slop/option.rb
diff options
context:
space:
mode:
authorAmon Sha <amon.sha@gmail.com>2012-01-26 20:22:43 +0200
committerAmon Sha <amon.sha@gmail.com>2012-01-27 13:03:27 +0200
commitdd7545d57d355c7897376cf84cdc0f5737e0be30 (patch)
treea7871bdde5fae4ba39d2e38a6ea1c1ac4098c22f /lib/slop/option.rb
parent66297720398c51839ffa117eb354e356973dd930 (diff)
downloadslop-dd7545d57d355c7897376cf84cdc0f5737e0be30.tar.gz
Allow decimal integers only in strict argument check
Diffstat (limited to 'lib/slop/option.rb')
-rw-r--r--lib/slop/option.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/slop/option.rb b/lib/slop/option.rb
index cf0f11d..fc02387 100644
--- a/lib/slop/option.rb
+++ b/lib/slop/option.rb
@@ -137,7 +137,7 @@ class Slop
def value_to_integer(value)
if @slop.config[:strict]
begin
- Integer(value.to_s)
+ Integer(value.to_s, 10)
rescue ArgumentError
raise InvalidArgumentError,
"#{value} could not be coerced into Integer"