diff --git a/pack.rb b/pack.rb index b6e29c3eab..e70c6c7dc8 100644 --- a/pack.rb +++ b/pack.rb @@ -11,10 +11,14 @@ end class String # call-seq: - # unpack(template, offset: 0) -> array + # unpack(template, offset: 0, &block) -> array + # + # Extracts data from +self+. + # + # If +block+ is not given, forming objects that become the elements + # of a new array, and returns that array. Otherwise, yields each + # object. # - # Extracts data from +self+, forming objects that become the elements of a new array; - # returns that array. # See {Packed Data}[rdoc-ref:packed_data.rdoc]. def unpack(fmt, offset: 0) Primitive.attr! :use_block