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 1.7.0.dev (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/RubyModule.java:2538:in const_missing' from org/jruby/RubyClass.java:218:inallocate’
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’
from
/Users/agrimm/.rvm/rubies/jruby-head/lib/ruby/1.9/syck/rubytypes.rb:371:in
to_yaml' from (irb):5:inevaluate’
from org/jruby/RubyKernel.java:1094:in eval' from org/jruby/RubyKernel.java:1420:inloop’
from org/jruby/RubyKernel.java:1206:in catch' from org/jruby/RubyKernel.java:1206:incatch’
from /Users/agrimm/.rvm/rubies/jruby-head/bin/jirb:17:in `(root)’

I also asked about this at Stack Overflow:

Thanks,

Andrew

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