mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
numeric.c: use positive_int_p
* numeric.c (NUM_STEP_SCAN_ARGS): use positive_int_p() to fix rubyspec failures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ba6c734847
commit
9b6ee42d86
1 changed files with 1 additions and 1 deletions
|
@ -1864,7 +1864,7 @@ ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl)
|
|||
if (NIL_P(step)) { \
|
||||
step = INT2FIX(1); \
|
||||
} \
|
||||
desc = negative_int_p(step); \
|
||||
desc = !positive_int_p(step); \
|
||||
if (NIL_P(to)) { \
|
||||
to = desc ? DBL2NUM(-INFINITY) : DBL2NUM(INFINITY); \
|
||||
} \
|
||||
|
|
Loading…
Add table
Reference in a new issue