Package: ruby1.8
Version: 1.8.3+1.8.4preview2-1
Severity: normal
Tags: patch
I reported this upstream some time ago, it's bug 2525 on rubyforge.
http://rubyforge.org/tracker/?func=detail&aid=2535&group_id=426&atid=1698
Since it doesn't look like this is going to get fixed upstream for
1.8.4, I'm reporting it here. Hopefully it can at least be fixed in the
Debian package.
When loading Symbols containing characters that need to be quoted (e.g.
:"^foo"), the YAML library included with ruby 1.8.3 includes the quotes
in the Symbol. This makes it impossible for such Symbols to correctly
survive a round trip through YAML.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages ruby1.8 depends on:
ii libc6 2.3.5-9 GNU C Library: Shared libraries an
ii libruby1.8 1.8.3+1.8.4preview2-1 Libraries necessary to run Ruby 1.
ruby1.8 recommends no packages.
-- no debconf information
diff -ur ruby-1.8.3.dist/lib/yaml/rubytypes.rb ruby-1.8.3/lib/yaml/rubytypes.rb
--- ruby-1.8.3.dist/lib/yaml/rubytypes.rb 2005-09-20 01:46:45.000000000
-0500
+++ ruby-1.8.3/lib/yaml/rubytypes.rb 2005-09-28 12:00:41.556586678 -0500
@@ -183,6 +183,7 @@
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