[#99868] [Ruby master Bug#17144] Tempfile.open { ... } does not unlink the file — eregontp@...
Issue #17144 has been reported by Eregon (Benoit Daloze).
15 messages
2020/09/03
[ruby-core:99978] [Ruby master Bug#15409] OpenStruct error when attribute is called 'method'
From:
jean.boussier@...
Date:
2020-09-09 16:04:44 UTC
List:
ruby-core #99978
Issue #15409 has been updated by byroot (Jean Boussier).
> The only complicating factor is json has a dependency on ostruct. JSON::GenericObject inherits from OpenStruct
It is of very questionable usefulness though, so it could probably be deprecated at the same time, or make lazy loaded and make it try to load `ostruct`.
----------------------------------------
Bug #15409: OpenStruct error when attribute is called 'method'
https://bugs.ruby-lang.org/issues/15409#change-87516
* Author: elioncho (El僘s 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>