1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/integer.rb
2020-06-20 17:13:03 -07:00

10 lines
203 B
Ruby

class Integer
# call-seq:
# int.zero? -> true or false
#
# Returns +true+ if +num+ has a zero value.
def zero?
Primitive.attr! 'inline'
Primitive.cexpr! 'int_zero_p(self)'
end
end