mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Allow ',' and '\' to continue lines [Fixes #300]
This commit is contained in:
parent
a04c5f488a
commit
4098233435
1 changed files with 3 additions and 1 deletions
|
@ -556,7 +556,9 @@ class Pry
|
||||||
eval("BEGIN{throw :valid}\n#{str}", binding, Pry.eval_path)
|
eval("BEGIN{throw :valid}\n#{str}", binding, Pry.eval_path)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
true
|
|
||||||
|
# Assert that a line which ends with a , or a \ is incomplete.
|
||||||
|
str !~ /[,\\]$/
|
||||||
rescue SyntaxError => e
|
rescue SyntaxError => e
|
||||||
if incomplete_user_input_exception?(e)
|
if incomplete_user_input_exception?(e)
|
||||||
false
|
false
|
||||||
|
|
Loading…
Add table
Reference in a new issue