end of file p 'Hello, world! ⽂字列を囲み忘れたことによるエラー。 syntax errorだけど、エラー⽂にsyntax errorと表⽰されないパターン. エラー⽂を直訳すると「終了のない⽂字列が、ファイルの終わりに交わった」(?) Rubyのエラーを整理(初級者向け) 2020/10/24 13
〜2.2) wrong number of arguments (2 for 0..1) (ArgumentError) After (Ruby 2.3 〜 2.7) wrong number of arguments (given 2, expected 0..1) (ArgumentError) エラー⽂、だいぶわかりやすくなっている。 Rubyのエラーを整理(初級者向け) 2020/10/24 21
Main.rb:5:in `<main>': undefined local variable or method `hello' for main:Object (NameError) Did you mean? hello ヒント1: hello は定義されていないと怒られています。 ヒント2: いじわるな問題です。 Rubyのエラーを整理(初級者向け) 2020/10/24 39
# SyntaxError: leading zeros in decimal integer literals # are not permitted; use an 0o prefix for octal integers Pythonは、2 -> 3にかけて 010 のような 0 始まりの8進数を構⽂レベルで禁⽌した。 Rubyのエラーを整理(初級者向け) 2020/10/24 52