Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ルビーでは次のことができます。
do_stuff if foo == bar
技術的に言えば、&block前にコードのブロックをキャプチャすることはありifますか?これはどのように機能しますか?
&block
if
それらはメソッドではなく、キーワードです。それらの動作は言語仕様によって定義され、言語の規則によって制限されません。彼らはやりたいことが何でもできます。