From: Tomoyuki Chikanaga Date: 2011-12-13T12:24:11+09:00 Subject: [ruby-core:41625] [ruby-trunk - Bug #5755][Assigned] Errors raised and rescued in Kernel#loaded file still propagate Issue #5755 has been updated by Tomoyuki Chikanaga. File bug_5755.patch added Category set to core Status changed from Open to Assigned Assignee set to Tomoyuki Chikanaga Target version set to 2.0.0 Thank you for your report. I think this is a bug too. I've found a bad usage of rb_protect() in name_err_mesg_to_str(). When an exception is going to ignored, rb_thread_t::errinfo should be cleared. I'll attach a patch. I'd like to commit it later if there's no objection. BTW, I wonder if the similar problem exists in openssl extension. nahi-san, how do you think? ---------------------------------------- Bug #5755: Errors raised and rescued in Kernel#loaded file still propagate http://redmine.ruby-lang.org/issues/5755 Author: Nikolai Weibull Status: Assigned Priority: Normal Assignee: Tomoyuki Chikanaga Category: core Target version: 2.0.0 ruby -v: - a.rb: load 'b.rb' b.rb: begin BasicObject.new.inspect rescue => e p e end % ruby -v ruby 1.9.3p0 (2011-10-30 revision 33569) [x86_64-darwin10.8.0] % ruby a.rb #> b.rb:4:in `to_str': undefined method `inspect' for # (NoMethodError) from b.rb:4:in `to_s' from b.rb:4:in `inspect' from b.rb:4:in `p' from b.rb:4:in `rescue in ' from b.rb:1:in `' from a.rb:1:in `load' from a.rb:1:in `
' % ruby b.rb #> This is a bug, right? -- http://redmine.ruby-lang.org