From: ko1@... Date: 2020-10-09T07:42:34+00:00 Subject: [ruby-core:100345] [Ruby master Feature#17256] Freeze all Regexp objects Issue #17256 has been reported by ko1 (Koichi Sasada). ---------------------------------------- Feature #17256: Freeze all Regexp objects https://bugs.ruby-lang.org/issues/17256 * Author: ko1 (Koichi Sasada) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- To share Regexp objects between ractors, these regexps should be frozen. Now, Matz proposed make all Regexp objects frozen. On https://bugs.ruby-lang.org/issues/16377#note-7 > For the record: Regexp.new should continue to return unfrozen Regexp instance. so I'm afraid it is good way or not. But can we have your comment on it. If no comments, I'll try to freeze them , before Ruby 3.0 preview 2. BTW, I believe `/#{expr}/o` should be frozen because this expression only returns one Regexp object. -- https://bugs.ruby-lang.org/ Unsubscribe: