ActionsLike0
Bug #15409
closedOpenStruct error when attribute is called 'method'
ruby -v:
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin16]
Backport:
Tags:
Description
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:
require 'ostruct'
o = OpenStruct.new({ method: 'get' })
o.method
The expected behavior should be to return 'get'
Updated by mame (Yusuke Endoh) over 6 years ago
- Status changed from Open to Assigned
- Assignee set to marcandre (Marc-Andre Lafortune)
Updated by marcandre (Marc-Andre Lafortune) over 5 years ago
- Related to Bug #12136: OpenStruct.new(format: :bar).send :format # => too few arguments added
Updated by marcandre (Marc-Andre Lafortune) over 4 years ago
- Status changed from Assigned to Closed
Updated by mame (Yusuke Endoh) over 3 years ago
- Related to Bug #18032: Openstruct is ~20..25x slower with Ruby 3.0.0 and 3.0.1 compared to earlier versions added
ActionsLike0