From p.dalgaard@biostat.ku.dk  Sat Sep 18 11:21:42 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 18 Sep 1999 12:21:42 +0200
Subject: lambda error update (PR#282)
In-Reply-To: p.dalgaard@biostat.ku.dk's message of "Sat, 18 Sep 1999 11:40:00 +0200 (MET DST)"
References: <199909180940.LAA12533@pubhealth.ku.dk>
Message-ID: <x2yae4zfih.fsf@blueberry.kubism.ku.dk>

p.dalgaard@biostat.ku.dk writes:

> Error: incorrect number of arguments to "lambda"
> > fix(f)
> ...
> > f()
> >
> 
> D*mn! I should have thought of that. I'll see if I can cook up a fix
> for 0.65.1. Filed as a bug report.

Heh. Turned out to be absolutely trivial:

diff -u -r1.62.2.1 eval.c
--- eval.c	1999/09/02 15:11:59	1.62.2.1
+++ eval.c	1999/09/18 10:06:30
@@ -691,7 +691,7 @@
 {
     SEXP rval;
 
-    if (length(args) < 3)
+    if (length(args) < 2)
	WrongArgCount("lambda");
     CheckFormals(CAR(args));
     rval = mkCLOSXP(CAR(args), CADR(args), rho);

If the 3rd argument is absent, R_NilValue gets passed for the CADDR in

   setAttrib(rval, R_SourceSymbol, CADDR(args));

and that is exactly what should happen!

This has to be the smallest bugfix possible, AFAICS a single bit gets
flipped, both in the source and in the binaries....

Will commit in a moment.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


lambda error update (PR#282)
Peter Dalgaard BSA