File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ Wed Aug 22 10:07:48 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
2
+
3
+ * bignum.c (rb_big_neg): SIGNED_VALUE isn't in 1.8.
4
+
5
+ * bignum.c (bigtrunc): do not empty Bignum. [ruby-dev:31229]
6
+
1
7
Wed Aug 22 10:02:42 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
2
8
3
9
* numeric.c (fix_pow): 0**2 should not raise floating point
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ get2comp(x)
74
74
BDIGIT * ds = BDIGITS (x );
75
75
BDIGIT_DBL num ;
76
76
77
+ if (!i ) return ;
77
78
while (i -- ) ds [i ] = ~ds [i ];
78
79
i = 0 ; num = 1 ;
79
80
do {
@@ -102,7 +103,7 @@ bigtrunc(x)
102
103
long len = RBIGNUM (x )-> len ;
103
104
BDIGIT * ds = BDIGITS (x );
104
105
105
- while (len -- && !ds [len ]);
106
+ while (-- len && !ds [len ]);
106
107
RBIGNUM (x )-> len = ++ len ;
107
108
return x ;
108
109
}
@@ -1086,6 +1087,7 @@ rb_big_neg(x)
1086
1087
if (!RBIGNUM (x )-> sign ) get2comp (z );
1087
1088
ds = BDIGITS (z );
1088
1089
i = RBIGNUM (x )-> len ;
1090
+ if (!i ) return INT2FIX (~0 );
1089
1091
while (i -- ) ds [i ] = ~ds [i ];
1090
1092
RBIGNUM (z )-> sign = !RBIGNUM (z )-> sign ;
1091
1093
if (RBIGNUM (x )-> sign ) get2comp (z );
Original file line number Diff line number Diff line change 2
2
#define RUBY_RELEASE_DATE "2007-08-22"
3
3
#define RUBY_VERSION_CODE 186
4
4
#define RUBY_RELEASE_CODE 20070822
5
- #define RUBY_PATCHLEVEL 60
5
+ #define RUBY_PATCHLEVEL 63
6
6
7
7
#define RUBY_VERSION_MAJOR 1
8
8
#define RUBY_VERSION_MINOR 8
You can’t perform that action at this time.
0 commit comments