Exception: Optimize::Codec::UnsupportedOpcode

Inherits:
StandardError
  • Object
show all
Defined in:
lib/optimize/codec.rb

Overview

Raised when an unknown opcode is encountered in the bytecode stream.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opcode_num, offset) ⇒ UnsupportedOpcode

Returns a new instance of UnsupportedOpcode.



42
43
44
45
46
# File 'lib/optimize/codec.rb', line 42

def initialize(opcode_num, offset)
  @opcode_num = opcode_num
  @offset     = offset
  super("Unsupported opcode #{opcode_num} at byte offset #{offset}")
end

Instance Attribute Details

#offsetObject (readonly)

Returns the value of attribute offset.



40
41
42
# File 'lib/optimize/codec.rb', line 40

def offset
  @offset
end

#opcode_numObject (readonly)

Returns the value of attribute opcode_num.



40
41
42
# File 'lib/optimize/codec.rb', line 40

def opcode_num
  @opcode_num
end