diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-07 08:42:50 -0300 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-07 08:42:50 -0300 |
commit | 8dd7448b183456a1dff5ce30dc3e3d49c78bd813 (patch) | |
tree | 4c3871a5a8b1b4584a41d11b969982185c49e5ca /test | |
parent | 7f812e945b73e3c696b1baeebbc1516e94f8d16a (diff) | |
download | psych-8dd7448b183456a1dff5ce30dc3e3d49c78bd813.zip |
* ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
like base 60 numbers are serialized as quoted strings.
* test/psych/test_string.rb: test for change.
Fixes #25
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_string.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb index 51f1280..cffc121 100644 --- a/test/psych/test_string.rb +++ b/test/psych/test_string.rb @@ -2,6 +2,12 @@ require 'psych/helper' module Psych class TestString < TestCase + def test_string_with_base_60 + yaml = Psych.dump '01:03:05' + assert_match "'01:03:05'", yaml + assert_equal '01:03:05', Psych.load(yaml) + end + def test_tagged_binary_should_be_dumped_as_binary string = "hello world!" string.force_encoding 'ascii-8bit' |