Hi, At Thu, 21 Sep 2006 23:52:56 +0900, Ondrej Bilka wrote in [ruby-core:08904]: > Bugfix and implented bignum odd? and even? Thank you, commited. > BTW. How do you debug ruby. At README.EXT is this missing. > I dont know easy way to inspect ruby objects inside gdb. I used printf+guessing what obj contain. > But now its "obvious bug" free. I use attached .gdbinit. Still I don't have time to review the patch, just a nitpicking. > --- bignum.c 4 Sep 2006 20:10:45 -0000 1.135 > +++ bignum.c 21 Sep 2006 14:46:25 -0000 > @@ -38,6 +38,13 @@ > > #define BIGZEROP(x) (RBIGNUM(x)->len == 0 || (RBIGNUM(x)->len == 1 && BDIGITS(x)[0] == 0)) > > +VALUE rb_num_plus(VALUE x,VALUE y); > +VALUE rb_num_minus(VALUE x,VALUE y); > +VALUE rb_num_mul(VALUE x,VALUE y); > +VALUE rb_num_sqr(VALUE x); > +VALUE rb_num_pow(VALUE x,VALUE y); Why are these in bignum.c? It feels they are OK in numeric.c. Also, I suspect this change makes Fixnum operations slower. > +#define CSTR_TO_BIG_TRESHOLD 32 Is TRESHOLD a typo? > - len *= strlen(str)*sizeof(char); > + len=strlen(str); > + BDIGIT hbase; > + long charsperdig; > + charperdig(base,&hbase,&charsperdig); > + long si=len/charsperdig+1; Illegal in C90. > + if FIXNUM_P(x) Oops. -- Nobu Nakada