Forum: Ruby YAML in 1.8.3 and 1.8.4

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
784481e009179262d133db1f1eb3bfb1?d=identicon&s=25 Edwin Van leeuwen (blackedder)
on 2006-01-29 17:21
Hi guys,

I'm trying to learn the usage of yaml from:
http://yaml4r.sourceforge.net/doc/ 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
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2006-01-29 17:27
(Received via mailing list)
On Jan 29, 2006, at 10:21 AM, Edwin van Leeuwen wrote:

> 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
784481e009179262d133db1f1eb3bfb1?d=identicon&s=25 Edwin Van leeuwen (blackedder)
on 2006-01-29 17:45
> 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
This topic is locked and can not be replied to.