lib/packetgen/structfu.rb in packetgen-0.2.0 vs lib/packetgen/structfu.rb in packetgen-0.3.0
- old
+ new
@@ -237,9 +237,13 @@
def read(str)
str = str.to_s
self.replace str
self
end
+
+ # @author Sylvain Daubert
+ # Added for consistency with Struct classes
+ alias :sz :length
end
# Provides a primitive for creating strings, preceeded by
# an Int type of length. By default, a string of length zero with
# a one-byte length is presumed.