From: RubyQuestions@... (RubyQuestions) Date: 2003-12-05T01:22:06+09:00 Subject: Re: YAML Question: Using YAML::YamlNode#transform Method to get float values? Thanks for the help. why the lucky stiff wrote in message news:<200312031207.37967.ruby-talk@whytheluckystiff.net>... > Indeed. Recent versions of the Ruby extension for Syck have consolidated > handling of all yaml.org transfer methods into a single yaml_org_handler > function (found in rubyext.c). This function ensures that Ruby YamlNode > objects and Syck's native SyckNode structures get handled identically. > > Your custom types and ruby.yaml.org types should be handled the same in both > 1.8.0 and current versions. > > _why > > On Tuesday 02 December 2003 08:32 pm, David A. Black wrote: > > Hi -- > > > > On Wed, 3 Dec 2003, RubyQuestions wrote: > > > I'm trying to use the transform method in YAML to grab the values from > > > my > > > classes. Everything works correctly, except when I try to get the > > > price data (Floats) from my class. I'm trying to understand if I > > > should be doing something different. > > > > In 1.8.1 CVS versions it seems to be fixed: > > > > # 1.8.0: > > $ ruby -v videos.rb > > ruby 1.8.0 (2003-08-04) [i686-linux] > > [# > @value="22.45", @type_id="float#fix">, > > # > @value="19.72", @type_id="float#fix">] > > > > # More recent CVS: > > $ /usr/local/lib/ruby-cvs/bin/ruby -v videos.rb > > ruby 1.8.1 (2003-11-10) [i686-linux] > > [22.45, 19.72] > > > > > > David