From 04e30e310370760db4f60660d3f3c299524b8adf Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 23 Oct 2008 07:21:05 +0000 Subject: [PATCH] * lib/irb/init.rb (IRB.load_modules): catch LoadError explicitly. a patch from Daniel Berger in [ruby-core:19451]. fix [ruby-core:19450] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ lib/irb/init.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8f31302b3..122fdf690d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Oct 23 16:19:33 2008 Yukihiro Matsumoto + + * lib/irb/init.rb (IRB.load_modules): catch LoadError explicitly. + a patch from Daniel Berger in + [ruby-core:19451]. fix [ruby-core:19450] + Thu Oct 23 16:16:17 2008 Nobuyoshi Nakada * ext/socket/socket.c (sock_s_getservbyport): check if the port range. diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 84d2e9e76f..576b99d1c8 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -247,8 +247,8 @@ module IRB for m in @CONF[:LOAD_MODULES] begin require m - rescue # StandardError, ScriptError - print $@[0], ":", $!.class, ": ", $!, "\n" + rescue LoadError => err + warn err.backtrace[0] << ":#{err.class}: #{err}" end end end