From: shibata.hiroshi@... Date: 2014-12-15T12:57:01+00:00 Subject: [ruby-core:66846] [ruby-trunk - Bug #10601] [Open] Unexpected behaviour changes for Struct class Issue #10601 has been reported by Hiroshi SHIBATA. ---------------------------------------- Bug #10601: Unexpected behaviour changes for Struct class https://bugs.ruby-lang.org/issues/10601 * Author: Hiroshi SHIBATA * Status: Open * Priority: Normal * Assignee: Eric Wong * Category: * Target version: current: 2.2.0 * ruby -v: ruby 2.2.0dev (2014-12-14 trunk 48835) [x86_64-darwin13] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- r48748 changes below code behaviour. ```ruby class Request < Struct.new(:params, :headers) def params=(hash) super end def []=(key, value) headers[key] = value end end Request.new.params = {} ``` ```sh % ruby -v test.rb ruby 2.2.0dev (2014-12-14 trunk 48835) [x86_64-darwin13] test.rb:7:in `[]=': undefined method `[]=' for nil:NilClass (NoMethodError) from :1:in `params=' from test.rb:3:in `params=' from test.rb:11:in `
' % ruby -v test.rb ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin13.0] ``` above code is included faraday known as famous http client library. >normal Can you investigate or revert r48748? I think this commit is feature category if it's your expected changes. We shouldn't apply this in 2.2.0.rc phase. -- https://bugs.ruby-lang.org/