From: usa@... Date: 2014-09-03T04:15:05+00:00 Subject: [ruby-core:64720] [ruby-trunk - Bug #10016] Destructuring block arguments with a Hashable last element Issue #10016 has been updated by Usaku NAKAMURA. Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: WONTFIX, 2.1: DONE ---------------------------------------- Bug #10016: Destructuring block arguments with a Hashable last element https://bugs.ruby-lang.org/issues/10016#change-48616 * Author: Brian Shirai * Status: Closed * Priority: Normal * Assignee: * Category: core * Target version: current: 2.2.0 * ruby -v: ruby 2.2.0dev (2014-06-05 trunk 46353) [x86_64-darwin13] * Backport: 2.0.0: WONTFIX, 2.1: DONE ---------------------------------------- The following code: ~~~ruby # destructure_bug.rb def m x = Object.new def x.to_hash() {x: 9} end yield [1, 2, 3, x] end p m { |a, *b, c, **k| [a, b, c, k] } ~~~ gives: ~~~ $ ruby -v destructure_bug.rb ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0] [#, [nil], 1, {:x=>9}] $ ruby -v destructure_bug.rb ruby 2.2.0dev (2014-06-05 trunk 46353) [x86_64-darwin13] [#, [nil], 1, {:x=>9}] ~~~ I would expect: `[1, [2], 3, {:x=>9}]` Is this a bug? -- https://bugs.ruby-lang.org/