[#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:100071] [Ruby master Bug#17182] Refinements behavior is broken
From:
merch-redmine@...
Date:
2020-09-22 16:00:07 UTC
List:
ruby-core #100071
Issue #17182 has been updated by jeremyevans0 (Jeremy Evans).
Assignee set to shugo (Shugo Maeda)
Status changed from Open to Assigned
This is discussed in https://bugs.ruby-lang.org/issues/17007#note-4. I'm not sure whether the previous behavior is spec or just an implementation detail. We could revert commit:eeef16e190cdabc2ba474622720f8e3df7bac43b, but then we end up with a SystemStackError in other cases. @shugo, do you know how we should handle this case?
----------------------------------------
Bug #17182: Refinements behavior is broken
https://bugs.ruby-lang.org/issues/17182#change-87623
* Author: osyo (manga osyo)
* Status: Assigned
* Priority: Normal
* Assignee: shugo (Shugo Maeda)
* ruby -v: ruby 3.0.0dev (2020-09-13T03:35:37Z master d7b279e79f) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
Calling the methods defined by Refinements via `super` from a singleton method breaks the behavior.
```ruby
class X
def hoge
["X#hoge"]
end
end
using Module.new {
refine X do
def hoge
["refine #hoge"] + super
end
end
}
x = X.new
def x.hoge
["x.hoge"] + super
end
# Refinements method is not called
p x.hoge
# 2.7.1 => ["x.hoge", "refine #hoge", "X#hoge"] OK: Expected behavior
# 3.0.0 => ["x.hoge", "X#hoge"] NG: Behavior is broken.
# Method#super_method refers to a Refinements method
p x.method(:hoge).super_method.call
# 2.7.1 => ["refine #hoge", "X#hoge"]
# 3.0.0 => ["refine #hoge", "X#hoge"]
```
This is broken by a fix for [`[Bug #17007]`](https://bugs.ruby-lang.org/issues/17007).
commit: https://github.com/ruby/ruby/commit/eeef16e190cdabc2ba474622720f8e3df7bac43b
Is this the intended change?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>