Damjan Rems wrote in post #1134248:
> I would like to merge two yaml objects into one.

There's no such thing as "yaml objects" the way you're saying it.  What 
o1 and o2 are depend on the files.  For example, this is a hash:

 ---
 foo: 1
 bar: 2

... and this is an array:

 ---
 - a
 - b
 - c

... etc.  So, if file1 and file2 both look like the first one, you can 
use regular hash methods, like #merge.

 o1 = YAML.load_file('file1.yml')
 o2 = YAML.load_file('file2.yml')
 o3 = o1.merge o2

Note: the YAML files could contain *any* Ruby objects, including 
arbitrary classes; but once they're loaded into Ruby they're just 
regular Ruby objects.

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