From: Kirk Haines Date: 2005-03-19T08:59:52+09:00 Subject: Re: Advice on ASCII representation of objects for testing using string compares? Jonathan Kohl wrote: > I've written a quick test that checks an input file for an application. > I have a "known good" baseline file, and I want to check the new file > against this. I attempted to serialize each conf file into objects to > do string compares. If the strings are not equal, then we need to check > the file for changes. If they are equal, the input file hasn't changed. This sounds like a job for YAML. ----- require 'yaml' a = {1,2,3,4,5,6} b = {1,2,3,4,5,6} aa = a.to_yaml bb = b.to_yaml puts "match" if aa == bb ----- Kirk Haines