From d573845696940760e632233c096ee644c000424b Mon Sep 17 00:00:00 2001 From: Viuginov Nickolay Date: Wed, 18 Oct 2017 17:25:30 +0300 Subject: [PATCH 1/2] 2.5.0 does not produce an empty statement --- lib/ruby-debug-ide/commands/expression_info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby-debug-ide/commands/expression_info.rb b/lib/ruby-debug-ide/commands/expression_info.rb index 795ca2d..6957238 100644 --- a/lib/ruby-debug-ide/commands/expression_info.rb +++ b/lib/ruby-debug-ide/commands/expression_info.rb @@ -30,7 +30,7 @@ def execute end incomplete = true - if /\A\s*\Z/m =~ last_statement + if /\A\s*\Z/m =~ last_statement || !last_statement.end_with?("\n\n") incomplete = false end From 258e16250853b23a95c0e0745b01d9edd5486082 Mon Sep 17 00:00:00 2001 From: Viuginov Nickolay Date: Tue, 14 Nov 2017 15:16:08 +0300 Subject: [PATCH 2/2] Add whitespace in the end of the command --- lib/ruby-debug-ide/commands/expression_info.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ruby-debug-ide/commands/expression_info.rb b/lib/ruby-debug-ide/commands/expression_info.rb index 6957238..a03bc83 100644 --- a/lib/ruby-debug-ide/commands/expression_info.rb +++ b/lib/ruby-debug-ide/commands/expression_info.rb @@ -9,7 +9,7 @@ def regexp end def execute - string_to_parse = Command.unescape_incoming(@match.post_match) + "\n\n\n" + string_to_parse = Command.unescape_incoming(@match.post_match) + " \n\n\n" total_lines = string_to_parse.count("\n") + 1 lexer = RubyLex.new @@ -30,7 +30,7 @@ def execute end incomplete = true - if /\A\s*\Z/m =~ last_statement || !last_statement.end_with?("\n\n") + if /\A\s*\Z/m =~ last_statement incomplete = false end