mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[Feature #16254] Use Primitive.func
style
This commit is contained in:
parent
49f0fd21e4
commit
63aadc237f
Notes:
git
2020-06-19 18:47:19 +09:00
9 changed files with 58 additions and 58 deletions
6
pack.rb
6
pack.rb
|
@ -131,7 +131,7 @@ class Array
|
|||
# X | --- | back up a byte
|
||||
# x | --- | null byte
|
||||
def pack(fmt, buffer: nil)
|
||||
__builtin.pack_pack(fmt, buffer)
|
||||
Primitive.pack_pack(fmt, buffer)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -254,7 +254,7 @@ class String
|
|||
# * Q_, Q!, q_, and q! are available since Ruby 2.1.
|
||||
# * I!<, i!<, I!>, and i!> are available since Ruby 1.9.3.
|
||||
def unpack(fmt)
|
||||
__builtin.pack_unpack(fmt)
|
||||
Primitive.pack_unpack(fmt)
|
||||
end
|
||||
|
||||
# call-seq:
|
||||
|
@ -278,6 +278,6 @@ class String
|
|||
# Thus unpack1 is convenient, makes clear the intention and signals
|
||||
# the expected return value to those reading the code.
|
||||
def unpack1(fmt)
|
||||
__builtin.pack_unpack1(fmt)
|
||||
Primitive.pack_unpack1(fmt)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue