From: Eric Hodel Date: 2007-12-13T09:11:21+09:00 Subject: Fix e2mmap.rb for 1.9 E2MM.Raise complains about $! being read-only now, and E2MM is used by RDoc. The following patch makes E2MM 1.9 compatible. May I check it in? Index: lib/e2mmap.rb =================================================================== --- lib/e2mmap.rb (revision 14203) +++ lib/e2mmap.rb (working copy) @@ -157,12 +157,14 @@ module Exception2MessageMapper # def E2MM.Raise(klass = E2MM, err = nil, *rest) if form = e2mm_message(klass, err) - $! = err.new(sprintf(form, *rest)) - $@ = caller(1) if $@.nil? + exception = err.new(sprintf(form, *rest)) + exception.set_backtrace caller(1) if $@.nil? #p $@ #p __FILE__ - $@.shift if $@[0] =~ /^#{Regexp.quote(__FILE__)}:/ - raise + if exception.backtrace[0] =~ /^#{Regexp.quote(__FILE__)}:/ then + exception.backtrace.shift + end + raise exception else E2MM.Fail E2MM, ErrNotRegisteredException, err.inspect end