diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-26 15:33:29 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-26 15:33:29 +0000 |
commit | 62cc5d4e01b2443cd48fc011affddf331d89301b (patch) | |
tree | f8c364356bb2594730bbfe7e4ced7f7c3177bb33 /lib/irb.rb | |
parent | 4adce79fa2410fef8b5c32c7c747757c2a580ebb (diff) |
merges r24229 and r24233 from trunk into ruby_1_9_1.
--
* 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]
--
* lib/irb.rb: forget svn commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24294 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 f5e662ac51..93093dd25a 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -64,13 +64,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 |