lib/xdr/var_array.rb in xdr-3.0.2 vs lib/xdr/var_array.rb in xdr-3.0.3

- old
+ new

@@ -2,12 +2,12 @@ include XDR::Concerns::ConvertsToXDR include XDR::Concerns::ArrayConverter singleton_class.send(:alias_method, :[], :new) - def initialize(child_type, length=XDR::MAX_SIZE) - @child_type = child_type + def initialize(child_type, length = XDR::MAX_SIZE) + @child_type = child_type @length = length end def write(val, io) length = val.length @@ -27,12 +27,12 @@ if length > @length raise XDR::ReadError, "VarArray length #{length} is greater than max #{@length}" end - length.times.map{ @child_type.read(io) } + length.times.map { @child_type.read(io) } end def valid?(val) super(val) && val.length <= @length end -end \ No newline at end of file +end