[#1147] Copying RVALUE — why the lucky stiff <ruby-core@...>

Hello, everyone. Hope you are all doing well.

18 messages 2003/06/17
[#1155] Re: Copying RVALUE — matz@... (Yukihiro Matsumoto) 2003/06/20

Hi,

[#1157] Re: Copying RVALUE — why the lucky stiff <ruby-core@...> 2003/06/20

Yukihiro Matsumoto (matz@ruby-lang.org) wrote:

[#1173] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...>

Hi, I'm new to this mailing list so I don't know the procedure for

15 messages 2003/06/22
[#1174] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — nobu.nokada@... 2003/06/22

Hi,

[#1175] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...> 2003/06/22

On Sun, 2003-06-22 at 05:36, nobu.nokada@softhome.net wrote:

[#1176] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — nobu.nokada@... 2003/06/22

Hi,

[#1193] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...> 2003/06/25

On Sun, 2003-06-22 at 07:41, nobu.nokada@softhome.net wrote:

[#1177] Re: In 1.8.0 nil.to_s is not the same as "" — ts <decoux@...>

14 messages 2003/06/22

Re: YAML problem

From: why the lucky stiff <ruby-core@...>
Date: 2003-06-05 05:49:15 UTC
List: ruby-core #1120
Tanaka Akira (akr@m17n.org) wrote:
> 
> % ruby -ryaml -e 'a = [{"a"=>"b"}] * 2; YAML.load(a.to_s)'                               
> /home/akr/ruby/lib/ruby/1.8/yaml.rb:28:in `load': parse error on line 0, col 4: `' (ArgumentError)
>         from /home/akr/ruby/lib/ruby/1.8/yaml.rb:28:in `load'
>         from -e:1
> 

Fixed.  Was a problem with anchors on a collection.

> % ruby -ryaml -e 'a = []; 1000.times { a << {"a"=>"b","c"=>"d"} }; puts a.to_yaml'|ruby -ryaml -e 'YAML.load(STDIN)'
> zsh: done                              ruby -ryaml -e  | 
> zsh: segmentation fault (core dumped)  ruby -ryaml -e 'YAML.load(STDIN)'

Marshal had the same problem years ago (see [ruby-dev:8067]).  I used
Matz' fix in [ruby-dev:8068].

This appeared to be a problem with GC nodes being used in rb_hash_aset.
I don't understand, since rb_ary_store didn't experience the same problems.  
Matz knows these secrets.

_why


In This Thread