Logo
Explore Help
Sign In
1berry/ruby
1
0
Fork 0
You've already forked ruby
Code Issues Packages Projects Releases Wiki Activity
ruby/integer.rb

11 lines
203 B
Ruby
Raw Normal View History

Make Integer#zero? a separated method and builtin (#3226) 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].
2020-06-20 14:55:09 -07:00
class Integer
# call-seq:
# int.zero? -> true or false
#
# Returns +true+ if +num+ has a zero value.
def zero?
Introduce Primitive.attr! to annotate 'inline' (#3242) [Feature #15589]
2020-06-20 17:13:03 -07:00
Primitive.attr! 'inline'
C-expression does not include a semicolon
2020-06-21 08:14:49 +09:00
Primitive.cexpr! 'int_zero_p(self)'
Make Integer#zero? a separated method and builtin (#3226) 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].
2020-06-20 14:55:09 -07:00
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 414ms Template: 20ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API