+ 2

In Ruby , do multi line comments require the begin and end keywords after the # character?

Ruby code multi line comment question

18th Nov 2017, 9:08 AM
GW III
2 Answers
+ 5
It is =begin some comment =end or # this iscomment also. # and this too.
18th Nov 2017, 11:19 AM
Paul
Paul - avatar
+ 1
Trying this in Code playground, the begin and end are needed. If they're not present, a syntax error is generated. https://code.sololearn.com/cV2WJ0dWK3xc/?ref=app
18th Nov 2017, 9:11 AM
GW III