diff options
author | Stan Lo <[email protected]> | 2024-06-18 16:15:19 +0100 |
---|---|---|
committer | git <[email protected]> | 2024-06-18 15:15:23 +0000 |
commit | 921f22e563d6372d9f853f87d48b11c479126da9 (patch) | |
tree | ef0fdc855ed5fddc52bb22df86e747e906f9abd3 /lib/irb/context.rb | |
parent | c2e2c5975d576076bb3e77524d5458d28e761742 (diff) |
[ruby/irb] Improve how command calls' return value is handled
(https://github.com/ruby/irb/pull/972)
In #934, we changed command calls to return nil only. This PR improves
the behaviour even further by:
- Not echoing the `nil` returned by command calls
- Not overriding previous return value stored in `_` with the
`nil` from commands
https://github.com/ruby/irb/commit/c844176842
Diffstat (limited to 'lib/irb/context.rb')
-rw-r--r-- | lib/irb/context.rb | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb index aafce7aade..74a08ca694 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -602,7 +602,6 @@ module IRB set_last_value(result) when Statement::Command statement.command_class.execute(self, statement.arg) - set_last_value(nil) end nil |