mirror of
https://github.com/ruby/ruby.git
synced 2026-08-02 20:49:12 +08:00
Extends the @_init guard to def_method so that an ERB object created via Marshal.load (which bypasses initialize) raises ArgumentError instead of evaluating arbitrary source. def_module and def_class both delegate to def_method and are covered by the same check. Co-authored-by: Tristan Madani <TristanInSec@gmail.com>