[#101179] Spectre Mitigations — Amel <amel.smajic@...>
Hi there!
5 messages
2020/12/01
[#101694] Ruby 3.0.0 Released — "NARUSE, Yui" <naruse@...>
V2UgYXJlIHBsZWFzZWQgdG8gYW5ub3VuY2UgdGhlIHJlbGVhc2Ugb2YgUnVieSAzLjAuMC4gRnJv
4 messages
2020/12/25
[ruby-core:101290] [Ruby master Bug#17374] Refined methods aren't visible from a refinement's module
From:
eregontp@...
Date:
2020-12-07 18:58:40 UTC
List:
ruby-core #101290
Issue #17374 has been updated by Eregon (Benoit Daloze).
Assignee set to shugo (Shugo Maeda)
marcandre (Marc-Andre Lafortune) wrote in #note-3:
> They can be defined in different `refine` blocks and it still works:
Yes, because they are `refine` under the same "refinement namespace" module.
And each `refine` is basically `using` all other `refine` in the same "refinement namespace" module.
The set of refinements that apply are captured at `def` time.
In the original example, there is no way to know that Implementation will be followed by `refine`, and that the methods declared there should be affected.
What you are asking is I think dynamic rebinding, because what should happen if:
```ruby
module R1
refine Foo do
prepend Foo::Implementation
end
end
module R2
refine Foo do
prepend Foo::Implementation
end
end
```
A given (lexical) call site should have a fixed set of used refinements (important for reasoning and performance).
That wouldn't hold for `Foo::Extension::Implementation#foo`, it could be either of R1 or R2 for the same call site.
----------------------------------------
Bug #17374: Refined methods aren't visible from a refinement's module
https://bugs.ruby-lang.org/issues/17374#change-88974
* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: shugo (Shugo Maeda)
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
--
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>