From: Tanaka Akira Date: 2011-12-09T18:03:15+09:00 Subject: [ruby-core:41568] Re: [ruby-trunk - Bug #5730][Open] Optinal block parameters assigns wrong 2011/12/9 Yukihiro Matsumoto : > |I think the consistency explains current behavior. > > From above examples, I consider the current behavior is NOT consistent > at all, under some condition. The behavior is consistent with method invocation. def foo(&block) block.call([1,2]) end foo{|k=5,v=6| p [k,v] # gives [[1,2],6] } def bar(k=5,v=6) p [k,v] # gives [[1,2],6] end bar([1,2]) So, it is consistent, under some condition. However, I re-read [ruby-dev:38795] and I feel the case should be treated as multiple arguments case. I.e. You are right. Now I think it is a bug. -- Tanaka Akira