summaryrefslogtreecommitdiff
path: root/test/optparse/test_acceptable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/optparse/test_acceptable.rb')
-rw-r--r--test/optparse/test_acceptable.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/optparse/test_acceptable.rb b/test/optparse/test_acceptable.rb
index dd38f8ec7a..5c3fbdb10c 100644
--- a/test/optparse/test_acceptable.rb
+++ b/test/optparse/test_acceptable.rb
@@ -85,6 +85,9 @@ class TestOptionParser::Acceptable < TestOptionParser
assert_equal(%w"", no_error {@opt.parse!(%w"--numeric 1/2")})
assert_equal(Rational(1, 2), @numeric)
+ assert_equal(%w"", no_error {@opt.parse!(%w"--numeric 010")})
+ assert_equal(8, @numeric)
+
assert_equal(%w"", no_error {@opt.parse!(%w"--numeric 1.2/2.3")})
assert_equal(Rational(12, 23), @numeric)