Project

General

Profile

Actions

Bug #21265

open

Crash when proc from Symbol#to_proc called outside refinement scope

Added by alanwu (Alan Wu) 3 days ago.

Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.2 and trunk
[ruby-core:121629]

Description

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.

No data to display

Actions

Also available in: Atom PDF

Like0