diff options
-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 |