summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 12:54:18 +0000
committerkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 12:54:18 +0000
commit14e5c442c50e2e7fc5a526b0a93ef2e98e74a0f6 (patch)
treea5ba438ca6a45193534b5f9e6e2b0620d1e767d1
parent997130419662ba9c00649add570e717e18a264a8 (diff)
* lib/irb/ext/multi-irb.rb: fix multi-irb running
parallelly. [ruby-dev:41031] [Bug #3182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/irb/ext/multi-irb.rb14
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 419eed8d7b..5d67e2a49a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 22 21:50:17 2010 Keiju Ishitsuka <keiju@ruby-lang.org>
+
+ * lib/irb/ext/multi-irb.rb: fix multi-irb running
+ parallelly. [ruby-dev:41031] [Bug #3182]
+
Thu Apr 22 17:13:34 2010 Eric Hodel <drbrain@segment7.net>
* lib/rubygems: Import RubyGems 1.3.7.pre.1 (as 1.3.6.1).
diff --git a/lib/irb/ext/multi-irb.rb b/lib/irb/ext/multi-irb.rb
index 7bb1a7cfab..0152d38ffd 100644
--- a/lib/irb/ext/multi-irb.rb
+++ b/lib/irb/ext/multi-irb.rb
@@ -172,12 +172,14 @@ module IRB
ensure
unless system_exit
@JobManager.delete(irb)
- if parent_thread.alive?
- @JobManager.current_job = @JobManager.irb(parent_thread)
- parent_thread.run
- else
- @JobManager.current_job = @JobManager.main_irb
- @JobManager.main_thread.run
+ if @JobManager.current_job == irb
+ if parent_thread.alive?
+ @JobManager.current_job = @JobManager.irb(parent_thread)
+ parent_thread.run
+ else
+ @JobManager.current_job = @JobManager.main_irb
+ @JobManager.main_thread.run
+ end
end
end
end