lambda error update (PR#282)
   
    Peter Dalgaard BSA
     
    p.dalgaard@biostat.ku.dk
       
    18 Sep 1999 12:21:42 +0200
    
    
  
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._