diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-10 03:05:40 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-10 03:05:40 +0000 |
commit | 26fefbb852e532eec98e874df8cef70003b7087f (patch) | |
tree | 95eaddad38a9afaed621816355598fb124d1971b /lib | |
parent | 59b4353ab658e96d3304d9d8359fab7779b8a503 (diff) | |
download | ruby-26fefbb852e532eec98e874df8cef70003b7087f.tar.gz ruby-26fefbb852e532eec98e874df8cef70003b7087f.tar.xz ruby-26fefbb852e532eec98e874df8cef70003b7087f.zip |
* lib/yaml/rubytypes.rb (Symbol#yaml_new): YAML loading of quoted
Symbols broken. [ruby-Bugs:2535] (written by Aaron Schrab)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/yaml/rubytypes.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb index 10516d755..d58e9bb38 100644 --- a/lib/yaml/rubytypes.rb +++ b/lib/yaml/rubytypes.rb @@ -183,6 +183,7 @@ class Symbol yaml_as "tag:ruby.yaml.org,2002:sym" def Symbol.yaml_new( klass, tag, val ) if String === val + val = YAML::load( val ) if val =~ /\A(["']).*\1\z/ val.intern else raise YAML::TypeError, "Invalid Symbol: " + val.inspect |