Class: Struct

Inherits:
Object
  • Object
show all
Defined in:
lib/packetgen/structfu.rb

Instance Method Summary collapse

Instance Method Details

#force_binary(str) ⇒ Object

Monkeypatch for Struct to include some string safety – anything that uses Struct is going to presume binary strings anyway. Modified by S. Daubert to not call PacketFu.force_binary



360
361
362
# File 'lib/packetgen/structfu.rb', line 360

def force_binary(str)
  str.force_encoding Encoding::BINARY
end