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

Replace RBOOL macro

This commit is contained in:
S-H-GAMELINKS 2021-08-31 20:30:35 +09:00 committed by Nobuyoshi Nakada
parent 8f752c95d2
commit bdd6d8746f
Notes: git 2021-09-05 23:01:54 +09:00
15 changed files with 43 additions and 43 deletions

View file

@ -282,7 +282,7 @@ class Float
#
def zero?
Primitive.attr! 'inline'
Primitive.cexpr! 'FLOAT_ZERO_P(self) ? Qtrue : Qfalse'
Primitive.cexpr! 'RBOOL(FLOAT_ZERO_P(self))'
end
#
@ -293,7 +293,7 @@ class Float
#
def positive?
Primitive.attr! 'inline'
Primitive.cexpr! 'RFLOAT_VALUE(self) > 0.0 ? Qtrue : Qfalse'
Primitive.cexpr! 'RBOOL(RFLOAT_VALUE(self) > 0.0)'
end
#
@ -304,6 +304,6 @@ class Float
#
def negative?
Primitive.attr! 'inline'
Primitive.cexpr! 'RFLOAT_VALUE(self) < 0.0 ? Qtrue : Qfalse'
Primitive.cexpr! 'RBOOL(RFLOAT_VALUE(self) < 0.0)'
end
end