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

ruby-changes:12942

From: nobu <ko1@a...>
Date: Thu, 27 Aug 2009 13:51:38 +0900 (JST)
Subject: [ruby-changes:12942] Ruby:r24681 (trunk): * random.c (random_rand): random integer can be a fixnum for

nobu	2009-08-27 13:51:19 +0900 (Thu, 27 Aug 2009)

  New Revision: 24681

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

  Log:
    * random.c (random_rand): random integer can be a fixnum for
      bignum range.  [ruby-dev:39173]

  Modified files:
    trunk/ChangeLog
    trunk/random.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 24680)
+++ ChangeLog	(revision 24681)
@@ -1,3 +1,8 @@
+Thu Aug 27 13:51:12 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* random.c (random_rand): random integer can be a fixnum for
+	  bignum range.  [ruby-dev:39173]
+
 Thu Aug 27 08:16:34 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/strscan/strscan.c (strscan_set_string): set string should not be
Index: random.c
===================================================================
--- random.c	(revision 24680)
+++ random.c	(revision 24681)
@@ -1055,7 +1055,7 @@
 	long x = FIX2LONG(beg) + FIX2LONG(v);
 	return LONG2NUM(x);
     }
-    switch (BUILTIN_TYPE(v)) {
+    switch (TYPE(v)) {
       case T_BIGNUM:
 	return rb_big_plus(v, beg);
       case T_FLOAT:

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

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