ai/r18n — Issue #57: R18n breaks to_yaml()
Author: gderosa
Created: 2012-01-20 15:14:23+00:00
State: open

Hello,

as you may see in the following irb session, after requir'ing R18n, calling to_yaml() on any Ruby core object (Hash, Array etc.) results in an unexpected behavior:

$ irb -rirb/completion -ryaml
irb(main):001:0> {'a'=>1}.to_yaml()
=> "---\na: 1\n"
irb(main):002:0> require 'r18n-core'
=> true
irb(main):003:0> {'a'=>1}.to_yaml()
=> "--- !ruby/object:Hash\ntaguri: ! '!ruby/object:Hash'\nto_yaml_style: 1\n"

Everything goes like Hash#to_yaml implementation no longer existed, falling back to Object@to_yaml or something... :-o

Thanks,
Guido