ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:121629] [Ruby Bug#21265] Crash when proc from Symbol#to_proc called outside refinement scope
@ 2025-04-11  9:39 alanwu (Alan Wu) via ruby-core
  0 siblings, 0 replies; only message in thread
From: alanwu (Alan Wu) via ruby-core @ 2025-04-11  9:39 UTC (permalink / raw)
  To: ruby-core; +Cc: alanwu (Alan Wu)

Issue #21265 has been reported by alanwu (Alan Wu).

----------------------------------------
Bug #21265: Crash when proc from Symbol#to_proc called outside refinement scope
https://bugs.ruby-lang.org/issues/21265

* Author: alanwu (Alan Wu)
* Status: Open
* ruby -v: ruby 3.4.2 and trunk
* Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED
----------------------------------------
```ruby
class RefinedScope
  using(Module.new { refine(Kernel) { def itself = 0 } })
  ITSELF = :itself.to_proc
end

RefinedScope::ITSELF[0]
```

```
../vm_method.c:1371: Assertion Failed: prepare_callable_method_entry:RB_TYPE_2_P(defined_class, RUBY_T_ICLASS, RUBY_T_MODULE): defined_class: T_FALSE
```

Or SEGV without `-DRUBY_DEBUG`.



-- 
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/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-11  9:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-11  9:39 [ruby-core:121629] [Ruby Bug#21265] Crash when proc from Symbol#to_proc called outside refinement scope alanwu (Alan Wu) via ruby-core

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 NNTP newsgroup(s).