1
0
Fork 0
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:
nobu 2013-09-07 19:04:33 +00:00
parent ba6c734847
commit 9b6ee42d86

View file

@ -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); \
} \