On 21 Μάϊος, 22:02, Roger B. [email protected] wrote:
I know that Illias is probably trolling,
Mr. Braun, I’ve placed a simple technical question. If someone is
“trolling”, than it’s not me, but those who write off-topic, off-
context and those who talk about trolling. This starts to become
annoying, mostly because it gives this medium an unprofessional touch,
which reflects negatively on ruby.
This should be avoided.
but there is a way to get the
desired behaviour: Use Psych (https://github.com/tenderlove/psych).
[email protected]:~$ irb
ruby-1.9.2-p180 :001 > require “psych”
ruby-1.9.2-p180 :003 > require “yaml”
ruby-1.9.2-p180 :004 > YAML.dump(“ööö”)
=> “— ööö\n…\n”
I’ve verified this solution, it works fine (utf-8 arrives human-
readable within the yaml file, as it should).
require “psych” // place before yaml
YAML::ENGINE.yamler = “psych”
Thanks a lot!