* [ruby-core:111116] [Ruby master Bug#19164] [3.2.0dev] Freezing an object can prevent removing methods on its class
@ 2022-12-01 8:09 byroot (Jean Boussier)
0 siblings, 0 replies; only message in thread
From: byroot (Jean Boussier) @ 2022-12-01 8:09 UTC (permalink / raw)
To: ruby-core
Issue #19164 has been reported by byroot (Jean Boussier).
----------------------------------------
Bug #19164: [3.2.0dev] Freezing an object can prevent removing methods on its class
https://bugs.ruby-lang.org/issues/19164
* Author: byroot (Jean Boussier)
* Status: Open
* Priority: Normal
* Target version: 3.2
* ruby -v: ruby 3.2.0dev (2022-11-30T08:20:38Z master c8bfbbc25e) [arm64-darwin22]
* Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED
----------------------------------------
The following snippet showcase the bug. It passes on 3.1 and older, but fails on 3.2.0
```ruby
klass = Class.new
klass.prepend(Module.new)
klass.new.freeze
klass.class_eval do
define_method(:bar) {} # works
remove_method(:bar) # raise FrozenError
end
```
Bisecting with this script points me to [e7b1ff984fde859a7778dec564731eb79392406f](https://github.com/ruby/ruby/commit/e7b1ff984fde859a7778dec564731eb79392406f), which suggest some part of the codebase might be misusing some user flags.
I have a patch that fix this script but I doubt it's the right fix, I'll be working with @jemmai and @tenderlovemaking to find a proper fix.
I'm opening this ticket to make sure it's addressed before the 3.2.0 final release.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-01 8:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 8:09 [ruby-core:111116] [Ruby master Bug#19164] [3.2.0dev] Freezing an object can prevent removing methods on its class byroot (Jean Boussier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).