From: brabuhr@... Date: 2008-09-10T22:17:34+09:00 Subject: Re: YAML doesn't seem to be working properly On Tue, Sep 9, 2008 at 10:17 PM, Eric Gerlach wrote: > I'm trying to marshal some data using Ruby's YAML library, but the files > that YAML.rb is creating aren't loading up properly. I've brought in > the libraries from the most recent 1.8.6 branch, but the problem isn't > solved there. > > I've attached a stub script which demonstrates the problem. If someone > who has 1.8.7 can test it and let me know the results, that would be a > huge help. (The script should print some stuff and *not* crash out with > an exception). I don't have 1.8.7 handy, but 1.8.6 and JRuby 1.1: $ ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-linux] $ ruby x.rb /usr/lib/ruby/site_ruby/1.8:/usr/lib/ruby/site_ruby/1.8/i386-linux:/usr/lib/ruby /site_ruby:/usr/lib/site_ruby/1.8:/usr/lib/site_ruby/1.8/i386-linux:/usr/lib/sit e_ruby:/usr/lib/ruby/1.8:/usr/lib/ruby/1.8/i386-linux:.#, @z=[#>]>]> #, @z=nil>]> Test3 x.rb:31: undefined method `[]' for nil:NilClass (NoMethodError) $ jruby -v ruby 1.8.6 (2008-03-28 rev 6360) [i386-jruby1.1] $ jruby x.rb /usr2/java/jruby-1.1/lib/ruby/site_ruby/1.8:/usr2/java/jruby-1.1/lib/ruby/site_r uby:/usr2/java/jruby-1.1/lib/ruby/1.8:/usr2/java/jruby-1.1/lib/ruby/1.8/java:lib /ruby/1.8:.#, @z=[#>]>]> #, @z=[#>]>]> Test3 Test3