diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-09 08:44:15 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-09 08:44:15 +0000 |
commit | 4ed5e8bb9f9b231fd6a815be664e4fec5e26f09a (patch) | |
tree | ba84997ddbb17212c3dccb9ecc966d9f3cea5de2 /lib/irb.rb | |
parent | 66c9241789cd80fde9aa8731f4daa04f0c20b08d (diff) |
merge revision(s) 24254:
* lib/irb.rb, lib/irb/init.rb, lib/irb/ext/save-history.rb: add
IRB::irb_at_exit. no use finalizer saving history. [ruby-dev-38563]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb.rb')
-rw-r--r-- | lib/irb.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index 7580e39d43..0b5d6ba57e 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -65,13 +65,21 @@ module IRB trap("SIGINT") do 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 |