Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Array#pack
(::string fmt, ?buffer: ::String?) -> ::String
pack(template, buffer: nil) → string
pack.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/pack.rb, line 7
def pack(fmt, buffer: nil)
Primitive.pack_pack(fmt, buffer)
end
Formats each element in self into a binary string; returns that string. See Packed Data.
Ruby version changes
-
3.3
-
Array#packnow raisesArgumentErrorfor unknown directives. [Bug #19150]
-