Lionel Thiry
4/11/2005 4:38:00 PM
Dido Sevilla a écrit :
> I've written several programs that use YAML to store their
> configuration files, and I generally run them on Ruby 1.8.2.
> Occasionally we have a setup with a Ruby 1.8.1 or older version around
> and noticed that the YAML module on these older versions of Ruby
> behaves differently from that of 1.8.2. In particular, this YAML
> string:
>
> "--- :abc"
>
> produces different results from 1.8.1 and 1.8.2. Under 1.8.2, I get
> the expected behavior, and
>
> YAML::load("--- :abc") => :abc
>
> However, under 1.8.1:
>
> YAML:load("--- :abc") => ":abc"
>
> This totally breaks my config file scheme and is incredibly annoying.
> Apparently, copying the YAML module from 1.8.2 to 1.8.1 doesn't fix
> this behavior. I've had to write a short function to fix this brain
> damage, but I wonder if there is a better way.
>
>
I've already answered, but my post doesn't appear in newsgroup. I retry:
YAML::load( "--- !ruby/sym abc" ) => :abc
--
Lionel Thiry