[ruby-core:121629] [Ruby Bug#21265] Crash when proc from Symbol#to_proc called outside refinement scope
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/
Issue #21265 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED to 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE ruby_3_4 commit:ef2d4bf51bf28cfc427388a19e4a5fe9bbbe7a7a merged revision(s) commit:6e6f5d3c32a709c891ac6aa7833376907a6c81b5. ---------------------------------------- Bug #21265: Crash when proc from Symbol#to_proc called outside refinement scope https://bugs.ruby-lang.org/issues/21265#change-115494 * Author: alanwu (Alan Wu) * Status: Closed * ruby -v: ruby 3.4.2 and trunk * Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE ---------------------------------------- ```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/
participants (2)
-
alanwu (Alan Wu) -
k0kubun (Takashi Kokubun)