From: SASADA Koichi Date: 2012-11-08T08:23:09+09:00 Subject: [ruby-core:49072] Re: [ruby-trunk - Feature #7299] Ruby should not completely ignore blocks. (2012/11/08 5:48), matz (Yukihiro Matsumoto) wrote: > Under the current language spec, absence of '& argument' may or may not mean the method would take a block. I agree that such checking is very useful. # example code p 'str'.gsub('x') do end One idea: If compiled method does not contain - `yield' statement - super statement - block argument then the method is marked as "block is not needed" method. This approach introduce incompatibility because we can call block in `eval'. # example def foo str eval str end foo('yield') do ... end And maybe there are other issues. -- // SASADA Koichi at atdot dot net