summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-30 09:45:04 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-30 09:45:04 -0700
commit1e1aadba8331c4f0ee607671e491b0eafc270531 (patch)
treec4b40f66f22aa76a845aca31d78d00a5bfafd838 /lib
parent59e343cfc97458a38e9a9da5b0e9ba102fed0dd6 (diff)
downloadpsych-1e1aadba8331c4f0ee607671e491b0eafc270531.zip
round trip empty strings
Diffstat (limited to 'lib')
-rw-r--r--lib/psych/visitors/yast_builder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/psych/visitors/yast_builder.rb b/lib/psych/visitors/yast_builder.rb
index 90dc8d0..52eae59 100644
--- a/lib/psych/visitors/yast_builder.rb
+++ b/lib/psych/visitors/yast_builder.rb
@@ -21,7 +21,7 @@ module Psych
end
def visit_String o
- quote = !!(o =~ /^(null|~)$/i)
+ quote = !!(o =~ /^(null|~)$/i or o.empty?)
scalar = Nodes::Scalar.new(o, nil, nil, !quote, quote)
@stack.last.children << scalar