1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Introduce Primitive.attr! to annotate 'inline' (#3242)

[Feature #15589]
This commit is contained in:
Takashi Kokubun 2020-06-20 17:13:03 -07:00 committed by GitHub
parent d95249ade3
commit 7561db8c00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2020-06-21 09:13:27 +09:00
Merged-By: k0kubun <takashikkbn@gmail.com>
7 changed files with 74 additions and 2 deletions

View file

@ -4,6 +4,7 @@ class Integer
#
# Returns +true+ if +num+ has a zero value.
def zero?
Primitive.attr! 'inline'
Primitive.cexpr! 'int_zero_p(self)'
end
end