# File lib/ruby-vpi/integer.rb, line 62 def pack aPackedWidth bits = length bits += 1 if self > 0 # positive integers also have a sign bit (zero) unless aPackedWidth >= bits raise ArgumentError, "packed width #{aPackedWidth} must be at least #{bits} for integer #{self}" end extend_sign(bits, aPackedWidth) end