ruby-changes:2886
From: ko1@a...
Date: 21 Dec 2007 11:31:32 +0900
Subject: [ruby-changes:2886] akr - Ruby:r14377 (trunk): * regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,
akr 2007-12-21 11:31:11 +0900 (Fri, 21 Dec 2007)
New Revision: 14377
Modified files:
trunk/ChangeLog
trunk/benchmark/bm_so_meteor_contest.rb
trunk/bignum.c
trunk/compile.c
trunk/ext/openssl/ossl_bn.c
trunk/ext/tk/lib/tcltk.rb
trunk/ext/tk/sample/demos-en/entry3.rb
trunk/ext/win32ole/win32ole.c
trunk/io.c
trunk/lib/getoptlong.rb
trunk/lib/net/imap.rb
trunk/numeric.c
trunk/parse.y
trunk/regerror.c
trunk/ruby.c
trunk/sprintf.c
trunk/string.c
trunk/vm.c
Log:
* regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,
compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c,
ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb,
ext/openssl/ossl_bn.c, numeric.c, vm.c,
benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal"
for non law violation context.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/numeric.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/string.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/benchmark/bm_so_meteor_contest.rb?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/net/imap.rb?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/openssl/ossl_bn.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/compile.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ruby.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/tk/lib/tcltk.rb?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/getoptlong.rb?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bignum.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/win32ole/win32ole.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/sprintf.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/vm.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/regerror.c?r1=14377&r2=14376
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/tk/sample/demos-en/entry3.rb?r1=14377&r2=14376
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14376)
+++ ChangeLog (revision 14377)
@@ -1,3 +1,12 @@
+Fri Dec 21 11:28:00 2007 Tanaka Akira <akr@f...>
+
+ * regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,
+ compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c,
+ ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb,
+ ext/openssl/ossl_bn.c, numeric.c, vm.c,
+ benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal"
+ for non law violation context.
+
Fri Dec 21 11:23:24 2007 Nobuyoshi Nakada <nobu@r...>
* common.mk (enc.mk): depends on $(RBCONFIG) instead of rbconfig.rb.
Index: regerror.c
===================================================================
--- regerror.c (revision 14376)
+++ regerror.c (revision 14377)
@@ -85,9 +85,9 @@
case ONIGERR_END_PATTERN_AT_CONTROL:
p = "end pattern at control"; break;
case ONIGERR_META_CODE_SYNTAX:
- p = "illegal meta-code syntax"; break;
+ p = "invalid meta-code syntax"; break;
case ONIGERR_CONTROL_CODE_SYNTAX:
- p = "illegal control-code syntax"; break;
+ p = "invalid control-code syntax"; break;
case ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE:
p = "char-class value at end of range"; break;
case ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE:
Index: string.c
===================================================================
--- string.c (revision 14376)
+++ string.c (revision 14377)
@@ -2904,7 +2904,7 @@
else base = NUM2INT(b);
if (base < 0) {
- rb_raise(rb_eArgError, "illegal radix %d", base);
+ rb_raise(rb_eArgError, "invalid radix %d", base);
}
return rb_str_to_inum(str, base, Qfalse);
}
Index: io.c
===================================================================
--- io.c (revision 14376)
+++ io.c (revision 14377)
@@ -2906,7 +2906,7 @@
}
return MODE_BINMODE("r+", "rb+");
}
- rb_raise(rb_eArgError, "illegal access modenum %o", flags);
+ rb_raise(rb_eArgError, "invalid access modenum %o", flags);
return NULL; /* not reached */
}
@@ -2928,7 +2928,7 @@
break;
default:
error:
- rb_raise(rb_eArgError, "illegal access mode %s", mode);
+ rb_raise(rb_eArgError, "invalid access mode %s", mode);
}
while (*m) {
@@ -2999,7 +2999,7 @@
break;
default:
error:
- rb_raise(rb_eArgError, "illegal access mode %s", mode);
+ rb_raise(rb_eArgError, "invalid access mode %s", mode);
}
while (*m) {
@@ -3046,7 +3046,7 @@
case O_RDWR:
return MODE_BINARY("r+", "rb+");
}
- rb_raise(rb_eArgError, "illegal access modenum %o", flags);
+ rb_raise(rb_eArgError, "invalid access modenum %o", flags);
return NULL; /* not reached */
}
Index: lib/getoptlong.rb
===================================================================
--- lib/getoptlong.rb (revision 14376)
+++ lib/getoptlong.rb (revision 14377)
@@ -570,7 +570,7 @@
# 1003.2 specifies the format of this message.
#
if ENV.include?('POSIXLY_CORRECT')
- set_error(InvalidOption, "illegal option -- #{ch}")
+ set_error(InvalidOption, "invalid option -- #{ch}")
else
set_error(InvalidOption, "invalid option -- #{ch}")
end
Index: lib/net/imap.rb
===================================================================
--- lib/net/imap.rb (revision 14376)
+++ lib/net/imap.rb (revision 14377)
@@ -3045,7 +3045,7 @@
parse_error("unknown token - %s", $&.dump)
end
else
- parse_error("illegal @lex_state - %s", @lex_state.inspect)
+ parse_error("invalid @lex_state - %s", @lex_state.inspect)
end
end
Index: compile.c
===================================================================
--- compile.c (revision 14376)
+++ compile.c (revision 14377)
@@ -3597,7 +3597,7 @@
}
}
else {
- rb_bug("illegal goto/label format");
+ rb_bug("invalid goto/label format");
}
Index: sprintf.c
===================================================================
--- sprintf.c (revision 14376)
+++ sprintf.c (revision 14377)
@@ -406,7 +406,7 @@
p--;
case '%':
if (flags != FNONE) {
- rb_raise(rb_eArgError, "illegal format character - %%");
+ rb_raise(rb_eArgError, "invalid format character - %%");
}
PUSH("%", 1);
break;
Index: parse.y
===================================================================
--- parse.y (revision 14376)
+++ parse.y (revision 14377)
@@ -4999,7 +4999,7 @@
return 0;
}
if (codepoint > 0x10ffff) {
- yyerror("illegal Unicode codepoint (too large)");
+ yyerror("invalid Unicode codepoint (too large)");
return 0;
}
lex_p += numlen;
@@ -5287,7 +5287,7 @@
{
int len = parser_precise_mbclen();
if (!MBCLEN_CHARFOUND(len)) {
- compile_error(PARSER_ARG "illegal multibyte char");
+ compile_error(PARSER_ARG "invalid multibyte char");
return -1;
}
tokadd(c);
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c (revision 14376)
+++ ext/win32ole/win32ole.c (revision 14377)
@@ -4057,7 +4057,7 @@
SysFreeString(pBuf);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError,
- "illegal iid: `%s'",
+ "invalid iid: `%s'",
StringValuePtr(str_iid));
}
Index: ext/tk/sample/demos-en/entry3.rb
===================================================================
--- ext/tk/sample/demos-en/entry3.rb (revision 14376)
+++ ext/tk/sample/demos-en/entry3.rb (revision 14377)
@@ -28,7 +28,7 @@
characters and sounds the bell when an attempt to go over the limit \
is made. The third accepts US phone numbers, mapping letters to \
their digit equivalent and sounding the bell on encountering an \
-illegal character or if trying to type over a character that is not \
+invalid character or if trying to type over a character that is not \
a digit. The fourth is a password field that accepts up to eight \
characters (silently ignoring further ones), and displaying them as \
asterisk characters.
Index: ext/tk/lib/tcltk.rb
===================================================================
--- ext/tk/lib/tcltk.rb (revision 14376)
+++ ext/tk/lib/tcltk.rb (revision 14377)
@@ -265,7 +265,7 @@
# (used in TclTkInterpreter#initialize())
# need two arguments
- fail("illegal # of parameter") if args.size != 2
+ fail("invalid # of parameter") if args.size != 2
# ip: interpreter(TclTkIp)
# exp: tcl/tk representation
Index: ext/openssl/ossl_bn.c
===================================================================
--- ext/openssl/ossl_bn.c (revision 14376)
+++ ext/openssl/ossl_bn.c (revision 14377)
@@ -151,7 +151,7 @@
}
break;
default:
- ossl_raise(rb_eArgError, "illegal radix %d", base);
+ ossl_raise(rb_eArgError, "invalid radix %d", base);
}
return self;
}
@@ -203,7 +203,7 @@
str = ossl_buf2str(buf, strlen(buf));
break;
default:
- ossl_raise(rb_eArgError, "illegal radix %d", base);
+ ossl_raise(rb_eArgError, "invalid radix %d", base);
}
return str;
Index: numeric.c
===================================================================
--- numeric.c (revision 14376)
+++ numeric.c (revision 14377)
@@ -1965,7 +1965,7 @@
int neg = 0;
if (base < 2 || 36 < base) {
- rb_raise(rb_eArgError, "illegal radix %d", base);
+ rb_raise(rb_eArgError, "invalid radix %d", base);
}
if (val == 0) {
return rb_str_new2("0");
Index: vm.c
===================================================================
--- vm.c (revision 14376)
+++ vm.c (revision 14377)
@@ -266,7 +266,7 @@
if (VMDEBUG &&
(!(cfp->lfp[-1] == Qnil ||
BUILTIN_TYPE(cfp->lfp[-1]) == T_VALUES))) {
- rb_bug("illegal svar");
+ rb_bug("invalid svar");
}
if (!RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
@@ -788,7 +788,7 @@
if (cfp->lfp && cfp->lfp[-1] != Qnil &&
TYPE(cfp->lfp[-1]) != T_VALUES) {
/* dp(cfp->lfp[-1]); */
- rb_bug("!!!illegal svar!!!");
+ rb_bug("!!!invalid svar!!!");
}
cfp++;
}
Index: benchmark/bm_so_meteor_contest.rb
===================================================================
--- benchmark/bm_so_meteor_contest.rb (revision 14376)
+++ benchmark/bm_so_meteor_contest.rb (revision 14377)
@@ -15,7 +15,7 @@
# class to represent all information about a particular rotation of a particular piece
class Rotation
# an array (by location) containing a bit mask for how the piece maps at the given location.
- # if the rotation is illegal at that location the mask will contain false
+ # if the rotation is invalid at that location the mask will contain false
attr_reader :start_masks
# maps a direction to a relative location. these differ depending on whether it is an even or
Index: ruby.c
===================================================================
--- ruby.c (revision 14376)
+++ ruby.c (revision 14377)
@@ -935,7 +935,7 @@
break;
if (!strchr("IdvwWrK", *s))
rb_raise(rb_eRuntimeError,
- "illegal switch in RUBYOPT: -%c", *s);
+ "invalid switch in RUBYOPT: -%c", *s);
s = moreswitches(s, opt);
}
}
Index: bignum.c
===================================================================
--- bignum.c (revision 14376)
+++ bignum.c (revision 14377)
@@ -460,7 +460,7 @@
break;
default:
if (base < 2 || 36 < base) {
- rb_raise(rb_eArgError, "illegal radix %d", base);
+ rb_raise(rb_eArgError, "invalid radix %d", base);
}
if (base <= 32) {
len = 5;
@@ -802,7 +802,7 @@
long bits;
if (base < 2 || 36 < base)
- rb_bug("illegal radix %d", base);
+ rb_bug("invalid radix %d", base);
if (FIXNUM_P(x)) {
bits = (SIZEOF_LONG*CHAR_BIT - 1)/2 + 1;
@@ -909,7 +909,7 @@
}
if (base < 2 || 36 < base)
- rb_raise(rb_eArgError, "illegal radix %d", base);
+ rb_raise(rb_eArgError, "invalid radix %d", base);
n2 = big2str_find_n1(x, base);
n1 = (n2 + 1) / 2;
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml