diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-30 09:43:11 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-30 09:43:11 -0700 |
commit | 59e343cfc97458a38e9a9da5b0e9ba102fed0dd6 (patch) | |
tree | db83f6b105994eee867bb8831781703da4afcaaa /lib | |
parent | 1fb4171aae09eeed11f00dcc3b2ddd8a609394be (diff) | |
download | psych-59e343cfc97458a38e9a9da5b0e9ba102fed0dd6.zip |
returning nil on empty string
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych/visitors/to_ruby.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |