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



358
359
360
# File 'lib/packetgen/structfu.rb', line 358

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