syntax error, unexpected tIDENTIFIER, expecting '}'

エラーメッセージ

 状態:  閲覧数:11,639  投稿日:2008-12-06  更新日:  
■エラー文
class Foo
__def print3
____yield(1,2)
__end
end
foo=Foo.new
foo.print3{|x,y|print x,"\n" print y,"\n"} //エラー箇所
}
syntax error, unexpected tIDENTIFIER, expecting '}' //エラーメッセージ

■修正後
class Foo
__def print3
____yield(1,2)
__end
end
foo=Foo.new
foo.print3{|x,y|print x,"\n";print y,"\n"} //修正箇所


コメント投稿(ログインが必要)



類似度ページランキング
順位 ページタイトル抜粋
1 syntax error, unexpected tIDENTIFIER, expecting '}' 51
2 autoescape 26
3 string 21
4 インスタンス(instance) 21
5 digits 18
6 引数(parameter) 16
7 yield 14
8 変数(variable) 13
9 モジュール(Module) 13
10 Proc 11
11 配列(Array) 10
12 do 8
13 ERB 7
14 ' ' 7
15 self 7
16 $KCODE 7
17 <% %> 3
18 <%= %> 3
19 <%= h %> 3
20 "文字列#{ }文字列" 3
2025/5/02 13:37 更新