From 1fb4171aae09eeed11f00dcc3b2ddd8a609394be Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 29 Sep 2009 21:20:25 -0700 Subject: reducing regular expression --- lib/psych/visitors/to_ruby.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/psych/visitors/to_ruby.rb b/lib/psych/visitors/to_ruby.rb index 9b5a253..10e03fe 100644 --- a/lib/psych/visitors/to_ruby.rb +++ b/lib/psych/visitors/to_ruby.rb @@ -14,8 +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 == '~' + return nil if o.value =~ /^(null|~)$/i end o.value -- cgit v1.2.3