summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-21 17:35:24 +0000
committerkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-21 17:35:24 +0000
commit2a03a94e9dd392a418901a8c19901bac0d710d74 (patch)
tree60f201bb22a39093c7c0830a39ec52f2af543c35 /lib
parent6978527c768c5a09d0e1e9ad67281447abca0e2b (diff)
downloadruby-2a03a94e9dd392a418901a8c19901bac0d710d74.tar.gz
ruby-2a03a94e9dd392a418901a8c19901bac0d710d74.tar.xz
ruby-2a03a94e9dd392a418901a8c19901bac0d710d74.zip
* lib/irb.rb: forget svn commit.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/irb.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 17d4ae51b..d914f06a7 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -65,12 +65,20 @@ module IRB
irb.signal_handle
end
- catch(:IRB_EXIT) do
- irb.eval_input
+ begin
+ catch(:IRB_EXIT) do
+ irb.eval_input
+ end
+ ensure
+ irb_at_exit
end
# print "\n"
end
+ def IRB.irb_at_exit
+ @CONF[:AT_EXIT].each{|hook| hook.call}
+ end
+
def IRB.irb_exit(irb, ret)
throw :IRB_EXIT, ret
end