diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-25 13:41:11 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-25 13:41:11 +0000 |
commit | cba52ec37cbe5be168f00ca9568e68fb1ed4f984 (patch) | |
tree | f3e96a875706ec16d27d2709727ac4b312a23e74 /lib/irb/ext/multi-irb.rb | |
parent | 4da80c7d6bca4de837637f03bd366a55999c36d7 (diff) | |
download | ruby-cba52ec37cbe5be168f00ca9568e68fb1ed4f984.tar.gz |
* lib/irb/extend-command.rb (def_extend_command): check number of
arguments. [ruby-dev:35074]
* lib/irb/ext/multi-irb.rb (search): check if a corresponding job is
found. [ruby-dev:35074]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/ext/multi-irb.rb')
-rw-r--r-- | lib/irb/ext/multi-irb.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/irb/ext/multi-irb.rb b/lib/irb/ext/multi-irb.rb index 9ad8f8b143..d32d41ff95 100644 --- a/lib/irb/ext/multi-irb.rb +++ b/lib/irb/ext/multi-irb.rb @@ -69,7 +69,7 @@ module IRB end def search(key) - case key + job = case key when Integer @jobs[key] when Irb @@ -77,10 +77,10 @@ module IRB when Thread @jobs.assoc(key) else - assoc = @jobs.find{|k, v| v.context.main.equal?(key)} - IRB.fail NoSuchJob, key if assoc.nil? - assoc + @jobs.find{|k, v| v.context.main.equal?(key)} end + IRB.fail NoSuchJob, key if job.nil? + job end def delete(key) |