Skip to content

Commit 3390eec

Browse files
committed
Prevent unintentional display the result of Session#send
1 parent fcf9432 commit 3390eec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/iruby/utils.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def display(obj, options = {})
99
Kernel.instance.session.send(:publish, :display_data,
1010
data: Display.display(obj, options),
1111
metadata: {}) unless obj.nil?
12+
# The next `nil` is necessary to prevent unintentional displaying
13+
# the result of Session#send
14+
nil
1215
end
1316

1417
# Clear the output area

0 commit comments

Comments
 (0)