R18n-core disturbs YAML::ENGINE #80

Closed
RmMsr opened this Issue Sep 3, 2012 · 5 comments

2 participants

@RmMsr

Hi,

I just noticed a problem that seems to be related to the way R18n loads YAML.

This code

#!/usr/bin/env ruby
require 'yaml'
require 'r18n-core'
#YAML::ENGINE.yamler = 'syck'
#YAML::ENGINE.yamler = 'psych'
puts "TEST".to_yaml

results to

--- !ruby/object:String
taguri: ! '!ruby/object:String'
to_yaml_style: 1

If the yamler is set to either syckor psychafter loading R18n, everything works fine.

Running ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0] with r18n-core (1.1.0)

@ai
Owner
ai commented Sep 4, 2012

I try to find fix tonight.

@RmMsr

thanks @ai for the fast reply. This is not urgent to me. Adding the YAML::ENGINE.yamler = 'psych'after require is an acceptable workaround for the moment.

@ai
Owner
ai commented Sep 4, 2012

OK, I will look later :).

@ai
Owner
ai commented Sep 8, 2012

Fixed 86d3a8f. to_yaml become to be broken by require 'syck'. Now R18n doesn’t change YAML parser (and have cleaner code in common and Rails YAML parsers :) ).

@ai ai closed this Sep 8, 2012
@RmMsr

Confirmed. Everything is fine since the release of r18n-core (1.1.1). Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment