summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-10-03 14:23:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-10-03 14:23:10 -0700
commit2422a9fc3aeff3c60c6510efbf655a34218c7605 (patch)
tree525da292089cf01cb3aabdefa7047e87c76a4712 /test
parent68a91d5e6446cacac9ded1c03381244557b02e2e (diff)
downloadpsych-2422a9fc3aeff3c60c6510efbf655a34218c7605.zip
Avoid accepting incorrect floating point values.
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_numeric.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/psych/test_numeric.rb b/test/psych/test_numeric.rb
new file mode 100644
index 0000000..9adb058
--- /dev/null
+++ b/test/psych/test_numeric.rb
@@ -0,0 +1,14 @@
+require 'psych/helper'
+
+module Psych
+ ###
+ # Test numerics from YAML spec:
+ # http://yaml.org/type/float.html
+ # http://yaml.org/type/int.html
+ class TestNumeric < TestCase
+ def test_non_float_with_0
+ str = Psych.load('--- 090')
+ assert_equal '090', str
+ end
+ end
+end