Do I need to indent my code in Ruby?

后端 未结 3 981
被撕碎了的回忆
被撕碎了的回忆 2021-01-07 22:32

You would think that this would be an easy question, but I can\'t find the answer anywhere. >_<

Will Ruby throw syntax errors if my code is indented incorrectly?

3条回答
  •  渐次进展
    2021-01-07 23:13

    Yes, it would work. Ruby only looks for the line breaks.

    But since code readability is also very important, I'd say you should take care of whitespace if only for that sake.

提交回复
热议问题