summaryrefslogtreecommitdiff
path: root/lib/irb/cmd/subirb.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/cmd/subirb.rb')
-rw-r--r--lib/irb/cmd/subirb.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/irb/cmd/subirb.rb b/lib/irb/cmd/subirb.rb
index 43364f1393..699b35fcb4 100644
--- a/lib/irb/cmd/subirb.rb
+++ b/lib/irb/cmd/subirb.rb
@@ -51,7 +51,8 @@ module IRB
category "IRB"
description "Switches to the session of the given number."
- def execute(key)
+ def execute(key = nil)
+ raise CommandArgumentError.new("Please specify the id of target IRB job (listed in the `jobs` command).") unless key
IRB.JobManager.switch(key)
end
end