C Erler wrote:

> A ruby program with the single instruction "require 'profile'" 
> (or with a small program attached afterward) fails on Ruby 1.8 
> and 1.9.
> 
> c:/ruby/lib/ruby/1.8/profiler.rb:30: undefined method `[]' for 
> nil:NilClass (NoMethodError)

This is AFAIk caused by rubygems which sets the RUBYOPT environment 
variable so that it will always invoke -rubygems before anything else. I 
think that debug, profiler, tracer and other libraries will then get 
return events from the trace func for which there was no call event 
which confuses them.