On Oct 31, 2006, at 1:05 PM, Eric Promislow wrote:

> If I run <<ri Abbrev>>, no problem.
>
> But with this code:
>
> ##########
> require 'yaml'
> require 'pp'
>
> class RiFinder
>   def initialize(sysdir)
>     @sysdir = sysdir
>   end
>
>   def get_class_info(clsName, info)
>     clsFile = "#{@sysdir}/#{clsName}/cdesc-#{clsName}.yaml"
>     puts "About to yaml <<#{clsFile}>>"
>     clsInfo = File.open(clsFile) { |io| YAML.load(io) }
>     pp clsInfo
>   end
> end
>
> rifinder = RiFinder.new("c:/ruby/share/ri/1.8/system", nil, nil)
> rifinder.get_class_info("Abbrev", nil)

Because you need to load/define all the classes it is trying to  
deserialize. yaml doesn't know where they are. Just pop in the  
appropriate requires up top and get rid of your munger.

FWIW, I went the munging route for risearch and for that matter...  
you seem to be writing much of the same sort of thing. Check my blog  
for the code. I'll release it to seattlerb sooner or later.