I see some stories that "Ruby doesn't distinguish between line breaks and whitespace" [^ space]. That's not the case.
[^ space]: The "blank" here is the so-called "half-width space" (U + 0020).
If line breaks and whitespace are indistinguishable
x = 1 puts x
You should see 1
, but you get a SyntaxError. That's no surprise.
Also,
puts
1
Should display 1
, but only line breaks are output. That's no surprise.
Ruby is rather a language that distinguishes between line breaks and whitespace. That is why the semicolon at the end of the sentence can be omitted.
Ruby on Rails Tutorial 4th Edition "4.3.4 CSS, Again" https://railstutorial.jp/chapters/rails_flavored_ruby?version=5.0#sec-css_revisited To
In fact, Ruby doesn't distinguish between line breaks and whitespace
There is a crap [^ latest]. Is this the source? !!
[^ latest]: I don't know what's going on with the latest version (because it's paid).
I think the Ruby on Rails tutorial is a really good tutorial. The quality of the Japanese translation is quite high, and I am grateful to the authors and translators. For that reason, I regret why such a rudimentary error was written.