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:
parent
8f752c95d2
commit
bdd6d8746f
Notes:
git
2021-09-05 23:01:54 +09:00
15 changed files with 43 additions and 43 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue