Project

General

Profile

Actions

Bug #15572

closed

`RubyVM::InstructionSequence` doesn't work with `extend`.

Added by ioquatix (Samuel Williams) over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:91323]

Description

For some reason,RubyVM::InstructionSequence.extend doesn't seem to work as expected.

module Loader
  def load_iseq(path)
    puts path
    return compile_file(path)
  end
end

# This doesn't work?
# RubyVM::InstructionSequence.extend(Loader)

# This works:
class << RubyVM::InstructionSequence
  prepend Loader
end
Actions

Also available in: Atom PDF

Like0
Like0Like0