[DOC] Mention block mode of String#unpack
This commit is contained in:
parent
e7144af750
commit
65a0795c3f
Notes:
git
2024-09-29 11:45:37 +00:00
10
pack.rb
10
pack.rb
@ -11,10 +11,14 @@ end
|
|||||||
|
|
||||||
class String
|
class String
|
||||||
# call-seq:
|
# 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].
|
# See {Packed Data}[rdoc-ref:packed_data.rdoc].
|
||||||
def unpack(fmt, offset: 0)
|
def unpack(fmt, offset: 0)
|
||||||
Primitive.attr! :use_block
|
Primitive.attr! :use_block
|
||||||
|
Loading…
x
Reference in New Issue
Block a user