mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
95b0fed371
A prerequisite to fix https://bugs.ruby-lang.org/issues/15589 with JIT. This commit alone doesn't make a significant difference yet, but I thought this commit should be committed independently. This method override was discussed in [Misc #16961].
9 lines
175 B
Ruby
9 lines
175 B
Ruby
class Integer
|
|
# call-seq:
|
|
# int.zero? -> true or false
|
|
#
|
|
# Returns +true+ if +num+ has a zero value.
|
|
def zero?
|
|
Primitive.cexpr! 'int_zero_p(self);'
|
|
end
|
|
end
|