summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 02:31:11 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 02:31:11 +0000
commit4cf437519f1cbefed5ad7ee2bf0e68857105823f (patch)
tree735cc60c2165cefab0d4cf11cd399e73f8c47f82
parent817a4e3c83fd830b93c286159e97a18654db1c35 (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--benchmark/bm_so_meteor_contest.rb2
-rw-r--r--bignum.c6
-rw-r--r--compile.c2
-rw-r--r--ext/openssl/ossl_bn.c4
-rw-r--r--ext/tk/lib/tcltk.rb2
-rw-r--r--ext/tk/sample/demos-en/entry3.rb2
-rw-r--r--ext/win32ole/win32ole.c2
-rw-r--r--io.c8
-rw-r--r--lib/getoptlong.rb2
-rw-r--r--lib/net/imap.rb2
-rw-r--r--numeric.c2
-rw-r--r--parse.y4
-rw-r--r--regerror.c4
-rw-r--r--ruby.c2
-rw-r--r--sprintf.c2
-rw-r--r--string.c2
-rw-r--r--vm.c4
18 files changed, 35 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index 64cedd5..bdeb915 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Fri Dec 21 11:28:00 2007 Tanaka Akira <akr@fsij.org>
+
+ * 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@ruby-lang.org>
* common.mk (enc.mk): depends on $(RBCONFIG) instead of rbconfig.rb.
diff --git a/benchmark/bm_so_meteor_contest.rb b/benchmark/bm_so_meteor_contest.rb
index 30b9971..99cf6a9 100644
--- a/benchmark/bm_so_meteor_contest.rb
+++ b/benchmark/bm_so_meteor_contest.rb
@@ -15,7 +15,7 @@ end
# 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
diff --git a/bignum.c b/bignum.c
index 39afad9..62c7516 100644
--- a/bignum.c
+++ b/bignum.c
@@ -460,7 +460,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
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 @@ big2str_find_n1(VALUE x, int base)
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 @@ rb_big2str0(VALUE x, int base, int trim)
}
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;
diff --git a/compile.c b/compile.c
index 10cd85f..046c68a 100644
--- a/compile.c
+++ b/compile.c
@@ -3597,7 +3597,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
}
else {
- rb_bug("illegal goto/label format");
+ rb_bug("invalid goto/label format");
}
diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index 60d9e55..83d2bf4 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -151,7 +151,7 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
}
break;
default:
- ossl_raise(rb_eArgError, "illegal radix %d", base);
+ ossl_raise(rb_eArgError, "invalid radix %d", base);
}
return self;
}
@@ -203,7 +203,7 @@ ossl_bn_to_s(int argc, VALUE *argv, VALUE self)
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;
diff --git a/ext/tk/lib/tcltk.rb b/ext/tk/lib/tcltk.rb
index 1a6694d..7f6f416 100644
--- a/ext/tk/lib/tcltk.rb
+++ b/ext/tk/lib/tcltk.rb
@@ -265,7 +265,7 @@ class TclTkWidget < TclTkCommand
# (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
diff --git a/ext/tk/sample/demos-en/entry3.rb b/ext/tk/sample/demos-en/entry3.rb
index 415b45f..68f77a0 100644
--- a/ext/tk/sample/demos-en/entry3.rb
+++ b/ext/tk/sample/demos-en/entry3.rb
@@ -28,7 +28,7 @@ problem. The second only accepts strings with fewer than ten \
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.
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 8612d5a..09e21b4 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -4057,7 +4057,7 @@ fole_query_interface(VALUE self, VALUE str_iid)
SysFreeString(pBuf);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError,
- "illegal iid: `%s'",
+ "invalid iid: `%s'",
StringValuePtr(str_iid));
}
diff --git a/io.c b/io.c
index 1a59cf2..e07845f 100644
--- a/io.c
+++ b/io.c
@@ -2906,7 +2906,7 @@ rb_io_flags_mode(int flags)
}
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 @@ rb_io_mode_flags(const char *mode)
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 @@ rb_io_mode_modenum(const char *mode)
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 @@ rb_io_modenum_mode(int flags)
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 */
}
diff --git a/lib/getoptlong.rb b/lib/getoptlong.rb
index 92c3761..ba9ca37 100644
--- a/lib/getoptlong.rb
+++ b/lib/getoptlong.rb
@@ -570,7 +570,7 @@ class GetoptLong
# 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
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 24e1bce..ad47872 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -3045,7 +3045,7 @@ module Net
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
diff --git a/numeric.c b/numeric.c
index 86b4c1d..7c78767 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1965,7 +1965,7 @@ rb_fix2str(VALUE x, int base)
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");
diff --git a/parse.y b/parse.y
index e683342..4c206a8 100644
--- a/parse.y
+++ b/parse.y
@@ -4999,7 +4999,7 @@ parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp,
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 @@ parser_tokadd_mbchar(struct parser_params *parser, int c)
{
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);
diff --git a/regerror.c b/regerror.c
index 5337346..cf80bbf 100644
--- a/regerror.c
+++ b/regerror.c
@@ -85,9 +85,9 @@ onig_error_code_to_format(int code)
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:
diff --git a/ruby.c b/ruby.c
index b3986dc..d380714 100644
--- a/ruby.c
+++ b/ruby.c
@@ -935,7 +935,7 @@ process_options(VALUE arg)
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);
}
}
diff --git a/sprintf.c b/sprintf.c
index b59e3d1..48aae1d 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -406,7 +406,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
p--;
case '%':
if (flags != FNONE) {
- rb_raise(rb_eArgError, "illegal format character - %%");
+ rb_raise(rb_eArgError, "invalid format character - %%");
}
PUSH("%", 1);
break;
diff --git a/string.c b/string.c
index eecfc63..2d25868 100644
--- a/string.c
+++ b/string.c
@@ -2904,7 +2904,7 @@ rb_str_to_i(int argc, VALUE *argv, VALUE str)
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);
}
diff --git a/vm.c b/vm.c
index d603c03..1ad9c7b 100644
--- a/vm.c
+++ b/vm.c
@@ -266,7 +266,7 @@ vm_make_env_each(rb_thread_t *th, rb_control_frame_t *cfp,
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 @@ check_svar(void)
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++;
}