[#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:100076] [Ruby master Bug#12251] DelegateClass(OpenStruct) behavior in 2.3.0 different from 2.2
From:
merch-redmine@...
Date:
2020-09-22 20:06:06 UTC
List:
ruby-core #100076
Issue #12251 has been updated by jeremyevans0 (Jeremy Evans).
Status changed from Open to Closed
The OpenStruct changes were reverted starting around commit:e026e186f4a01aa3f6cd02ae6ef33f44f129361c, so you once again get `/` output for the program.
----------------------------------------
Bug #12251: DelegateClass(OpenStruct) behavior in 2.3.0 different from 2.2
https://bugs.ruby-lang.org/issues/12251#change-87631
* Author: dblock (Daniel Doubrovkine)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
This came from https://github.com/ruby-grape/grape/issues/1348
~~~
require 'delegate'
require 'ostruct'
class AttributeTranslator < DelegateClass(OpenStruct)
def initialize(attributes = {})
ostruct = OpenStruct.new(attributes)
super ostruct
end
end
def namespace
'foobar'
end
instance = AttributeTranslator.new(namespace: '/')
puts instance.namespace
~~~
Ruby 2.2.1
=> '/'
Ruby 2.3.0
=> 'foobar'
Halp?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>