From: naruse@... Date: 2016-04-18T09:13:04+00:00 Subject: [ruby-core:75006] [Ruby trunk Bug#12291] Struct member accessor is not consistent with hash access when keys are repeated Issue #12291 has been updated by Yui NARUSE. Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE ruby_2_3 r54637 merged revision(s) 54611,54612. ---------------------------------------- Bug #12291: Struct member accessor is not consistent with hash access when keys are repeated https://bugs.ruby-lang.org/issues/12291#change-58137 * Author: James Coleman * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] * Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE ---------------------------------------- ~~~ irb(main):001:0> foo = Struct.new(:a, :a).new("1", "2") => # irb(main):002:0> foo.a => "2" irb(main):003:0> foo['a'] => "1" irb(main):004:0> foo.members => [:a, :a] irb(main):005:0> foo.to_h => {:a=>"2"} ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: