[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

YAML in 1.8.3 and 1.8.4

Edwin van Leeuwen

1/29/2006 4:21:00 PM

Hi guys,

I'm trying to learn the usage of yaml from:
http://yaml4r.sourceforg... and keep getting problems. The
biggest problem seems to be that the --- separator isn't included
anymore. For example:
irb(main):009:0> puts( true.to_yaml )
true

instead of the documented:
puts( true.to_yaml )
# prints:
# --- true

This makes it harder to just dump data to a file and load it later. I
reverted back to ruby 1.8.2 and there everything seems to be working
normally. I looked at the rdoc of 1.8.4 and all over the web and they
all indicate that the former behaviour is the correct one. Is this a bug
or has something changed? Is there a better/correct way of dumping a lot
of different objects to a file?

Greetings,
Edwin

--
Posted via http://www.ruby-....


2 Answers

James Gray

1/29/2006 4:26:00 PM

0

On Jan 29, 2006, at 10:21 AM, Edwin van Leeuwen wrote:

> Hi guys,
>
> I'm trying to learn the usage of yaml from:
> http://yaml4r.sourceforg... and keep getting problems. The
> biggest problem seems to be that the --- separator isn't included
> anymore. For example:
> irb(main):009:0> puts( true.to_yaml )
> true
>
> instead of the documented:
> puts( true.to_yaml )
> # prints:
> # --- true
>
> This makes it harder to just dump data to a file and load it later. I
> reverted back to ruby 1.8.2 and there everything seems to be working
> normally. I looked at the rdoc of 1.8.4 and all over the web and they
> all indicate that the former behaviour is the correct one. Is this
> a bug
> or has something changed?

This was a common problem with Ruby 1.8.3, but it has been fixed in
Ruby 1.8.4.

James Edward Gray II


Edwin van Leeuwen

1/29/2006 4:46:00 PM

0

> This was a common problem with Ruby 1.8.3, but it has been fixed in
> Ruby 1.8.4.
>
> James Edward Gray II
Ops excuse my stupidity, I was sure I was already running ruby 1.8.4,
but apparently I had not upgraded my laptop yet.

Edwin

--
Posted via http://www.ruby-....