[前][次][番号順一覧][スレッド一覧]

ruby-changes:30800

From: nobu <ko1@a...>
Date: Sun, 8 Sep 2013 04:05:05 +0900 (JST)
Subject: [ruby-changes:30800] nobu:r42877 (trunk): numeric.c: use positive_int_p

nobu	2013-09-08 04:04:33 +0900 (Sun, 08 Sep 2013)

  New Revision: 42877

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42877

  Log:
    numeric.c: use positive_int_p
    
    * numeric.c (NUM_STEP_SCAN_ARGS): use positive_int_p() to fix rubyspec
      failures.

  Modified files:
    trunk/numeric.c
Index: numeric.c
===================================================================
--- numeric.c	(revision 42876)
+++ numeric.c	(revision 42877)
@@ -1864,7 +1864,7 @@ ruby_num_interval_step_size(VALUE from, https://github.com/ruby/ruby/blob/trunk/numeric.c#L1864
     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);		\
     }									\

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]