Ville Mattila wrote:
> Hello,
> 
> The latest ruby cvs seems to work ok?
> 
> bash-3.00# ruby -r yaml -e 'y 1234567890000000000000'
> --- 1234567890000000000000
> bash-3.00# ruby -r yaml -e 'YAML.load 1234567890000000000000.to_yaml'
> bash-3.00# ruby -v
> ruby 1.8.4 (2006-03-04) [i386-solaris2.10]

That's good to hear. I'd rather not have to install from cvs in all my
locations, but my workaround didn't work (see below), so maybe that's
necessary.


$ ruby
require 'yaml'

class Bignum
  def to_yaml( opts = {} )
    super.sub(/!ruby\/object:Bignum /, "")
  end
end

h={}
h[1] = 1000000000000000
y h

-:5:in `to_yaml': private method `sub' called for
#<YAML::Syck::Scalar:0xb7b6d03c> (NoMethodError)
        from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:41:in `to_yaml'
        from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:40:in `to_yaml'
        from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:39:in `to_yaml'
        from /usr/local/lib/ruby/1.8/yaml.rb:387:in `quick_emit'
        from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:38:in `to_yaml'
        from /usr/local/lib/ruby/1.8/yaml.rb:117:in `dump'
        from /usr/local/lib/ruby/1.8/yaml.rb:428:in `y'
        from -:11

-- 
      vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407