For some reason,RubyVM::InstructionSequence.extend doesn't seem to work as expected.
moduleLoaderdefload_iseq(path)putspathreturncompile_file(path)endend# This doesn't work?# RubyVM::InstructionSequence.extend(Loader)# This works:class<<RubyVM::InstructionSequenceprependLoaderend
The script of [ruby-core:91323] uses method name "load_iseq" that is marked as "UNDEF". see r55656.
So I guess it is expected behavior, but I don't know the reason.
As wanabe pointed out, this isn't a bug. load_iseq is undef in the singleton class, which occurs before extended modules during method lookup. prepend on the singleton class works because prepended modules on the singleton class occur before methods in the singleton class itself during method lookup. Calling super in the prepended method results in a NoMethodError.