At Wed, 4 Sep 2002 18:19:53 +0900,
Michal Rokos wrote:
> 	I don't know what's the practice when I want commit something to
> 	CVS. Shall I post diff to ruby-lang, write directly author,
> 	or just commit it?
> 
> 	My current practice is to post it to ruby-core and if somebody
> 	from real Ruby hackers write that it is OK, commit it to CVS.
> 	But, because of 9 hour offset, I feel it very painfull (I have
> 	to wait 1 day to get a reply.)

Cc: is your friend.  Write to the author with ruby-core@ Cc:'d for
peer review, and wait for at least three whole days (72h) for a
response unless the fix is either obvious or fatal.  Just one day is
certainly not enough time for us *voluntary* people to read,
understand and reply to each proposed patch.  Please be patient.

On the other hand, to make the development smooth, every committer is
considered to be given a certain amount of the authority to fix
obvious bugs, typos and brainos.  So when you are too sure that this
applies, you can commit a fix right away with a proper (non-offensive,
but kind and informative) commit message.

> Index: ext/digest/digest.c
> ===================================================================
> RCS file: /src/ruby/ext/digest/digest.c,v
> retrieving revision 1.5
> diff -u -p -r1.5 digest.c
> --- ext/digest/digest.c	2002/09/04 06:37:37	1.5
> +++ ext/digest/digest.c	2002/09/04 09:12:23
> @@ -147,15 +147,14 @@ rb_digest_base_become(copy, obj)
>  {
>      algo_t *algo;
>      void *pctx1, *pctx2;
> -    VALUE klass;
>  
>      if (copy = obj) return copy;
>      rb_check_frozen(copy);
> -    algo = get_digest_base_metadata(CLASS_OF(klass));
> +    algo = get_digest_base_metadata(CLASS_OF(copy));
>      if (algo != get_digest_base_metadata(CLASS_OF(obj))) {
>  	rb_raise(rb_eTypeError, "wrong argument class");
>      }
> -    Data_Get_Struct(copy, void, pctx1);
> +    Data_Get_Struct(obj, void, pctx1);
>      Data_Get_Struct(copy, void, pctx2);
>      memcpy(pctx2, pctx1, algo->ctx_size);

I'm the one who wrote this module, but I'm just not sure if it was me
who wrote this particular function.  The patch seems ok, but the line
'if (copy = obj) return copy;' looks very odd.  Shouldn't the = be ==?

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"When I leave I don't know what I'm hoping to find
              When I leave I don't know what I'm leaving behind.."