From 59e343cfc97458a38e9a9da5b0e9ba102fed0dd6 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 30 Sep 2009 09:43:11 -0700 Subject: returning nil on empty string --- lib/psych/visitors/to_ruby.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/psych/visitors/to_ruby.rb b/lib/psych/visitors/to_ruby.rb index 10e03fe..ee603ff 100644 --- a/lib/psych/visitors/to_ruby.rb +++ b/lib/psych/visitors/to_ruby.rb @@ -14,7 +14,7 @@ module Psych return nil if o.tag == 'tag:yaml.org,2002:null' unless o.quoted - return nil if o.value =~ /^(null|~)$/i + return nil if o.value =~ /^(null|~)$/i or o.value.empty? end o.value -- cgit v1.2.3