Skip to content

Commit 02a9c35

Browse files
committed
Lines ending with \ are incomplete (kudos to fowl)
1 parent 4d2ed09 commit 02a9c35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pry/code.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def complete_expression?(str)
4848
end
4949
end
5050

51-
# Assert that a line which ends with a , is incomplete.
52-
str !~ /[,]\z/
51+
# Assert that a line which ends with a , or \ is incomplete.
52+
str !~ /[,\\]\s*\z/
5353
rescue SyntaxError => e
5454
if incomplete_user_input_exception?(e)
5555
false

0 commit comments

Comments
 (0)