[#97086] [Ruby master Bug#16612] Enumerator::ArithmeticSequence#last with float range produces incorrect value — muraken@...
Issue #16612 has been updated by mrkn (Kenta Murata).
4 messages
2020/02/07
[#97307] [Ruby master Feature#16663] Add block or filtered forms of Kernel#caller to allow early bail-out — headius@...
Issue #16663 has been reported by headius (Charles Nutter).
29 messages
2020/02/28
[ruby-core:97286] [Ruby master Bug#12251] DelegateClass(OpenStruct) behavior in 2.3.0 different from 2.2
From:
matz@...
Date:
2020-02-27 08:00:16 UTC
List:
ruby-core #97286
Issue #12251 has been updated by matz (Yukihiro Matsumoto).
Hmm, it was caused by OpenStruct performance pull-request. Maybe we should revert the PR?
Matz.
----------------------------------------
Bug #12251: DelegateClass(OpenStruct) behavior in 2.3.0 different from 2.2
https://bugs.ruby-lang.org/issues/12251#change-84404
* Author: dblock (Daniel Doubrovkine)
* Status: Open
* 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:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>