There was an error while loading. Please reload this page.
1 parent 94b810b commit 2a4519aCopy full SHA for 2a4519a
lib/irb/ruby-lex.rb
@@ -94,6 +94,7 @@ def configure_io(io)
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 !is_newline && lines[line_index]&.byteslice(0, byte_pointer)&.match?(/\A\s*\z/)
97
+ next nil if lines == [nil] # Workaround for exit IRB with CTRL+d
98
99
code = lines[0..line_index].map { |l| "#{l}\n" }.join
100
tokens = self.class.ripper_lex_without_warning(code, context: @context)
0 commit comments