Open MattCraftsCode opened 1 year ago
Hi @heshiweij, I have read this issue, and I think this is just a syntactical issue you are raising.
The correct way of joining a list, with semi colon, should be a.join('\;')
The reason why a.join(';')
is not working is that Ruby treat semi-colon as a line seperator. So according to that, ruby will infer the code a.join(';')
as:
a.join(';
')
which is the reason of the error.
Problem descriptions
Type the following code in byebug mode.
It occur the bellow synx error:
I think byebug error parses a comma in a string as an endinger for a line of code.
Environment
Expected behavior
Actual behavior
Raise a SyntaxError Exception.
Steps to reproduce the problem
a = [1,2]
, press "Enter".a.join(";")
, press "Enter".