[#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:101555] [Ruby master Misc#17412] Regexp vs Range: freezing differences
From:
zverok.offline@...
Date:
2020-12-20 10:37:14 UTC
List:
ruby-core #101555
Issue #17412 has been updated by zverok (Victor Shepelev).
Thanks for the explanation!
----------------------------------------
Misc #17412: Regexp vs Range: freezing differences
https://bugs.ruby-lang.org/issues/17412#change-89339
* Author: zverok (Victor Shepelev)
* Status: Closed
* Priority: Normal
----------------------------------------
While working on the changelog, I noticed the following in the 3.0:
```ruby
/foo/.frozen? # => true
(1..3).frozen? # => true
# but...
Regexp.new('foo').frozen? # => false
# ...whereupon
Range.new(1, 3).frozen? # => true
```
I'd like to understand, what is there a reason for non-literal regexps to not being frozen, and for ranges to be?
Corresponding tickets (#16377 and #15504) doesn't clarify the reasoning:
> For the record: `Regexp.new` should continue to return unfrozen Regexp instance. (@mame at #16377#note-7)
and:
> I'm for freezing all Ranges, not only Range literals. I hate the idea of freezing only literals because casually mixing frozen and unfrozen objects leads to hard-to-debug bugs that depend upon data flow. (@mame at #15504#note-3)
I understand that the matter is probably negligible, but will be very grateful for some explanations.
--
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>