summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-10-31 20:18:43 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-10-31 20:18:43 (GMT)
commitc2fed0e61c584f3a6d54a0c4479d43d8982505db (patch)
treea8229d10ddb9f4dd384a8b4244f16f718f6ecf07
parentfa6b7f2da5eb55b89dee6899b3421c3490bed77c (diff)
downloadtcl-c2fed0e61c584f3a6d54a0c4479d43d8982505db.zip
tcl-c2fed0e61c584f3a6d54a0c4479d43d8982505db.tar.gz
tcl-c2fed0e61c584f3a6d54a0c4479d43d8982505db.tar.bz2
[Bug 2889593]: Make [expr round()] give the right error.
-rw-r--r--ChangeLog13
-rw-r--r--generic/tclBasic.c4
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6bc2a22..a01a097 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,14 @@
+2009-10-31 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclBasic.c (ExprRoundFunc): [Bug 2889593]: Correctly report
+ the expected number of arguments when generating an error for round().
+
2009-10-30 Pat Thoyts <patthoyts@users.sourceforge.net>
- * tests/tcltest.test: When creating the notwritabledir we deny
- the current user access to delete the file. We must grant this
- right when we cleanup. Required on Windows 7 when the user does
- not automatically have administrator rights.
+ * tests/tcltest.test: When creating the notwritabledir we deny the
+ current user access to delete the file. We must grant this right when
+ we cleanup. Required on Windows 7 when the user does not automatically
+ have administrator rights.
2009-10-29 Don Porter <dgp@users.sourceforge.net>
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 7064b86..68fe439 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.404 2009/09/11 20:13:27 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.405 2009/10/31 20:18:43 dkf Exp $
*/
#include "tclInt.h"
@@ -7710,7 +7710,7 @@ ExprRoundFunc(
int type;
if (objc != 2) {
- MathFuncWrongNumArgs(interp, 1, objc, objv);
+ MathFuncWrongNumArgs(interp, 2, objc, objv);
return TCL_ERROR;
}