summaryrefslogtreecommitdiff
path: root/lib/irb/command/subirb.rb
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2024-04-27 01:52:08 +0800
committergit <svn-admin@ruby-lang.org>2024-04-26 17:52:12 +0000
commit148518baa06c50669de98d078f743a594ffe2fba (patch)
treef3accafda36262a43132708cc18121a2cdc57da7 /lib/irb/command/subirb.rb
parent6b120135afe1529a8ed1532b9da6878f1f4b1fbf (diff)
[ruby/irb] Suppress command return values
(https://github.com/ruby/irb/pull/934) Since commands can't be chained with methods, their return values are not intended to be used. But if IRB keeps storing command return values as the last value, and print them, users may rely on such implicit behaviour. So to avoid such confusion, this commit suppresses command's return values. It also updates some commands that currently rely on this implicit behaviour. https://github.com/ruby/irb/commit/fa96bea76f
Diffstat (limited to 'lib/irb/command/subirb.rb')
-rw-r--r--lib/irb/command/subirb.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/irb/command/subirb.rb b/lib/irb/command/subirb.rb
index 138d61c930..85af28c1a5 100644
--- a/lib/irb/command/subirb.rb
+++ b/lib/irb/command/subirb.rb
@@ -49,6 +49,7 @@ module IRB
extend_irb_context
IRB.irb(nil, *obj)
+ puts IRB.JobManager.inspect
end
end
@@ -65,7 +66,7 @@ module IRB
end
extend_irb_context
- IRB.JobManager
+ puts IRB.JobManager.inspect
end
end
@@ -90,6 +91,7 @@ module IRB
raise CommandArgumentError.new("Please specify the id of target IRB job (listed in the `jobs` command).") unless key
IRB.JobManager.switch(key)
+ puts IRB.JobManager.inspect
end
end
@@ -112,6 +114,7 @@ module IRB
extend_irb_context
IRB.JobManager.kill(*keys)
+ puts IRB.JobManager.inspect
end
end
end