Issue #15409 has been updated by marcandre (Marc-Andre Lafortune).


jeremyevans0 (Jeremy Evans) wrote in #note-10:
> marcandre (Marc-Andre Lafortune) wrote in #note-9:
> > I opened a PR that resolves this: https://github.com/ruby/ostruct/pull/15
> 
> I reviewed the PR and the changes look good to me.

Thanks for the quick review . I'll wait a few days and commit if there are no other comments.
 
> I would like to move ostruct from default gems to bundled gems, and at some point consider removing it as a bundled gem.

I don't have a strong opinion on this.



----------------------------------------
Bug #15409: OpenStruct error when attribute is called 'method'
https://bugs.ruby-lang.org/issues/15409#change-87515

* Author: elioncho (Elas Orozco)
* Status: Assigned
* Priority: Normal
* Assignee: marcandre (Marc-Andre Lafortune)
* ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin16]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
The following error is shown when you try to access an OpenStruct with a property called method:

`method': wrong number of arguments (given 0, expected 1) (ArgumentError)

To replicate:

~~~ ruby
require 'ostruct'
o = OpenStruct.new({ method: 'get' })
o.method
~~~


The expected behavior should be to return 'get'




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>