We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 454af73 commit fd8febaCopy full SHA for fd8feba
lib/irb/ruby-lex.rb
@@ -93,6 +93,7 @@ def configure_io(io)
93
94
if @io.respond_to?(:auto_indent) and @context.auto_indent_mode
95
@io.auto_indent do |lines, line_index, byte_pointer, is_newline|
96
+ next nil if lines == [nil] # Workaround for exit IRB with CTRL+d
97
next nil if !is_newline && lines[line_index]&.byteslice(0, byte_pointer)&.match?(/\A\s*\z/)
98
99
code = lines[0..line_index].map { |l| "#{l}\n" }.join
0 commit comments