[#101179] Spectre Mitigations — Amel <amel.smajic@...>
Hi there!
5 messages
2020/12/01
[#101180] Re: Spectre Mitigations
— Chris Seaton <chris@...>
2020/12/01
I wouldn’t recommend using Ruby to run in-process untrusted code in the first place. Are people doing that?
[#101694] Ruby 3.0.0 Released — "NARUSE, Yui" <naruse@...>
We are pleased to announce the release of Ruby 3.0.0. From 2015 we
4 messages
2020/12/25
[ruby-core:101305] [Ruby master Bug#17374] Refined methods aren't visible from a refinement's module
From:
merch-redmine@...
Date:
2020-12-08 04:39:56 UTC
List:
ruby-core #101305
Issue #17374 has been updated by jeremyevans0 (Jeremy Evans).
marcandre (Marc-Andre Lafortune) wrote in #note-10:
> jeremyevans0 (Jeremy Evans) wrote in #note-8:
> > It's not much better than calling `class_eval` with the same string in two places
>
> I think it is. A string isn't parsable (e.g. RuboCop, AST-based search tools, ...), nor syntax-highlightable, nor as debuggable, won't be detected by help generation tools, etc...
As commonly used, you are correct. However, one possibility is:
```ruby
path = File.expand_path('implementation.rb', __dir__)
code = File.read(path)
refine(Foo){class_eval(code, path)}
Implementation = Module.new{class_eval(code, path)}
```
This should be parsable and syntax-highlightable at least. I'm less sure about debuggability and interaction with help generation tools, though. Loss of code locality is definitely a downside.
----------------------------------------
Bug #17374: Refined methods aren't visible from a refinement's module
https://bugs.ruby-lang.org/issues/17374#change-88993
* 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>