[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: [YAML] Bignum problems
From: Ville Mattila <mulperi () cc ! hut ! fi>
Date: 2006-03-06 6:48:40
Message-ID: acc4dqa0.fsf () cc ! hut ! fi
[Download RAW message or body]
Joel VanderWerf <vjoel@path.berkeley.edu> writes:
>
> $ ruby
> require 'yaml'
>
> class Bignum
> def to_yaml( opts = {} )
> super.sub(/!ruby\/object:Bignum /, "")
> end
> end
>
> h={}
> h[1] = 1000000000000000
> y h
>
This works fine with CVS ruby, without your special hack.
So probably the cvs is way to go.
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0>
irb(main):003:0* h={}
=> {}
irb(main):004:0> h[1] = 1000000000000000
=> 1000000000000000
irb(main):005:0> y h
---
1: 1000000000000000
=> nil
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic