YAML::load( (String or IO) io )
The YAML::load method is for quick access to files containing a single YAML document. The document is parsed and the object it contains is returned. For example, to load the README that comes with YAML.rb:
readme = YAML::load( File.open( 'README' ) )
Since this method only parses a single document, the IO object is closed when the method exits.