[ruby/irb] Remove workaround for empty lines in dynamic_prompt
(https://github.com/ruby/irb/pull/884) https://github.com/ruby/irb/commit/820b9e8dd6
This commit is contained in:
parent
598b03648f
commit
f0172fc7ee
@ -1138,7 +1138,6 @@ module IRB
|
|||||||
end
|
end
|
||||||
if @context.io.respond_to?(:dynamic_prompt)
|
if @context.io.respond_to?(:dynamic_prompt)
|
||||||
@context.io.dynamic_prompt do |lines|
|
@context.io.dynamic_prompt do |lines|
|
||||||
lines << '' if lines.empty?
|
|
||||||
tokens = RubyLex.ripper_lex_without_warning(lines.map{ |l| l + "\n" }.join, local_variables: @context.local_variables)
|
tokens = RubyLex.ripper_lex_without_warning(lines.map{ |l| l + "\n" }.join, local_variables: @context.local_variables)
|
||||||
line_results = IRB::NestingParser.parse_by_line(tokens)
|
line_results = IRB::NestingParser.parse_by_line(tokens)
|
||||||
tokens_until_line = []
|
tokens_until_line = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user