How do I use syck in 1.9?

Am I using syck correctly in the following code?

Andrew-Grimms-MacBook-Pro:~ agrimm$ ruby --version
jruby (ruby-1.8.7-p330) (2011-06-05 a21339a) (Java
HotSpot™ 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java]
Andrew-Grimms-MacBook-Pro:~ agrimm$ ruby --1.9 -S irb
jruby-head :001 > require “yaml”
=> true
jruby-head :002 > 42.to_yaml
=> “%YAML 1.1\n— ! “42”\n…\n”
jruby-head :003 > YAML::ENGINE.yamler = “syck”
=> “syck”
jruby-head :004 > YAML::ENGINE.yamler
=> “syck”
jruby-head :005 > 42.to_yaml
NameError: uninitialized constant Syck::Yecht
from org/jruby/ const_missing' from org/jruby/’
from /Users/agrimm/.rvm/rubies/jruby-head/lib/ruby/1.9/syck.rb:102:in
emitter' from /Users/agrimm/.rvm/rubies/jruby-head/lib/ruby/1.9/syck.rb:399:inquick_emit’
to_yaml' from (irb):5:inevaluate’
from org/jruby/ eval' from org/jruby/’
from org/jruby/ catch' from org/jruby/’
from /Users/agrimm/.rvm/rubies/jruby-head/bin/jirb:17:in `(root)’

I also asked about this at Stack Overflow:



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs