diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-30 17:17:57 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-30 17:17:57 -0700 |
commit | b1cec69c840b12bb6351a40b9a97ebac029b1b6e (patch) | |
tree | c82fa89001896a27a5e008f57893cb4ff4414e75 | |
parent | 69037516509239cc9f700265b1579ccd92eafead (diff) | |
download | psych-b1cec69c840b12bb6351a40b9a97ebac029b1b6e.zip |
symbols must be longer
-rw-r--r-- | lib/psych/scalar_scanner.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_yast_builder.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/psych/scalar_scanner.rb b/lib/psych/scalar_scanner.rb index 71c75e3..be1e7b6 100644 --- a/lib/psych/scalar_scanner.rb +++ b/lib/psych/scalar_scanner.rb @@ -24,7 +24,7 @@ module Psych [:BOOLEAN, true] when /^(n|no|false|off)$/i [:BOOLEAN, false] - when /^:/i + when /^:.+/i [:SYMBOL, @string.sub(/^:/, '').to_sym] when /^[-+]?[1-9][0-9_]*(:[0-5]?[0-9])+$/ i = 0 diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yast_builder.rb index ec74462..d00a21c 100644 --- a/test/visitors/test_yast_builder.rb +++ b/test/visitors/test_yast_builder.rb @@ -24,6 +24,7 @@ module Psych assert_round_trip 'foo' assert_round_trip ':foo' assert_round_trip '' + assert_round_trip ':' end def test_boolean |