summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-28 02:45:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-28 02:45:23 +0000
commit88d5dcc8de20a613d35827198a30010e7ed4279b (patch)
tree7e5d3b3352dbd38446002315e32d41f271167573
parentba32fdd167304025106d9d79eb12388b29a4b1e6 (diff)
* exception error messages updated. [ruby-core:04497]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--array.c2
-rw-r--r--bignum.c2
-rw-r--r--error.c2
-rw-r--r--eval.c10
-rw-r--r--ext/Win32API/Win32API.c2
-rw-r--r--ext/bigdecimal/bigdecimal.c14
-rw-r--r--ext/curses/curses.c2
-rw-r--r--ext/dl/handle.c6
-rw-r--r--ext/openssl/ossl_cipher.c4
-rw-r--r--ext/pty/pty.c4
-rw-r--r--ext/readline/readline.c6
-rw-r--r--ext/socket/socket.c8
-rw-r--r--ext/strscan/strscan.c4
-rw-r--r--ext/win32ole/win32ole.c106
-rw-r--r--ext/zlib/zlib.c4
-rw-r--r--hash.c2
-rw-r--r--io.c4
-rw-r--r--marshal.c4
-rw-r--r--numeric.c2
-rw-r--r--object.c4
-rw-r--r--pack.c4
-rw-r--r--process.c4
-rw-r--r--range.c4
-rw-r--r--ruby.c10
-rw-r--r--signal.c2
-rw-r--r--sprintf.c2
27 files changed, 113 insertions, 109 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c9d79e396..0455a94543 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Feb 28 11:42:23 2005 Ian Macdonald <ian@caliban.org>
+
+ * exception error messages updated. [ruby-core:04497]
+
Mon Feb 28 09:03:09 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/socket/socket.c (Init_socket): add bunch of Socket
diff --git a/array.c b/array.c
index c31e5fbc8f..418cc97f57 100644
--- a/array.c
+++ b/array.c
@@ -2129,7 +2129,7 @@ rb_ary_transpose(ary)
}
}
else if (elen != RARRAY(tmp)->len) {
- rb_raise(rb_eIndexError, "element size differ (%d should be %d)",
+ rb_raise(rb_eIndexError, "element size differs (%d should be %d)",
RARRAY(tmp)->len, elen);
}
for (j=0; j<elen; j++) {
diff --git a/bignum.c b/bignum.c
index 3fecbdcc84..b6cb7b65b4 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1971,7 +1971,7 @@ rb_big_coerce(x, y)
return rb_assoc_new(rb_int2big(FIX2LONG(y)), x);
}
else {
- rb_raise(rb_eTypeError, "Can't coerce %s to Bignum",
+ rb_raise(rb_eTypeError, "can't coerce %s to Bignum",
rb_obj_classname(y));
}
/* not reached */
diff --git a/error.c b/error.c
index f4fbb10511..689ae3cf34 100644
--- a/error.c
+++ b/error.c
@@ -1080,7 +1080,7 @@ void
rb_notimplement()
{
rb_raise(rb_eNotImpError,
- "The %s() function is unimplemented on this machine",
+ "the %s() function is unimplemented on this machine",
rb_id2name(ruby_frame->last_func));
}
diff --git a/eval.c b/eval.c
index 90c5eb317f..2cbb985091 100644
--- a/eval.c
+++ b/eval.c
@@ -5450,7 +5450,7 @@ call_cfunc(func, recv, len, argc, argv)
argv[11], argv[12], argv[13], argv[14]);
break;
default:
- rb_raise(rb_eArgError, "too many arguments(%d)", len);
+ rb_raise(rb_eArgError, "too many arguments (%d)", len);
break;
}
return Qnil; /* not reached */
@@ -5503,7 +5503,7 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
int len = body->nd_argc;
if (len < -2) {
- rb_bug("bad argc(%d) specified for `%s(%s)'",
+ rb_bug("bad argc (%d) specified for `%s(%s)'",
len, rb_class2name(klass), rb_id2name(id));
}
if (trace_func) {
@@ -6003,7 +6003,7 @@ rb_f_caller(argc, argv)
if (NIL_P(level)) lev = 1;
else lev = NUM2INT(level);
- if (lev < 0) rb_raise(rb_eArgError, "negative level(%d)", lev);
+ if (lev < 0) rb_raise(rb_eArgError, "negative level (%d)", lev);
return backtrace(lev);
}
@@ -6795,7 +6795,7 @@ static void
load_failed(fname)
VALUE fname;
{
- rb_raise(rb_eLoadError, "No such file to load -- %s", RSTRING(fname)->ptr);
+ rb_raise(rb_eLoadError, "no such file to load -- %s", RSTRING(fname)->ptr);
}
VALUE
@@ -8787,7 +8787,7 @@ method_call(argc, argv, method)
Data_Get_Struct(method, struct METHOD, data);
if (data->recv == Qundef) {
- rb_raise(rb_eTypeError, "you cannot call unbound method; bind first");
+ rb_raise(rb_eTypeError, "can't call unbound method; bind first");
}
PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
PUSH_TAG(PROT_NONE);
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index 776df56ecb..be07b8504f 100644
--- a/ext/Win32API/Win32API.c
+++ b/ext/Win32API/Win32API.c
@@ -160,7 +160,7 @@ Win32API_Call(argc, argv, obj)
if (items != nimport)
- rb_raise(rb_eRuntimeError, "Wrong number of parameters: expected %d, got %d.\n",
+ rb_raise(rb_eRuntimeError, "wrong number of parameters: expected %d, got %d",
nimport, items);
for (i = 0; i < nimport; i++) {
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 4ccba8809a..5ac81114b3 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -202,7 +202,7 @@ BigDecimal_load(VALUE self, VALUE str)
/* First get max prec */
while((*pch)!=(unsigned char)'\0' && (ch=*pch++)!=(unsigned char)':') {
if(!ISDIGIT(ch)) {
- rb_raise(rb_eTypeError, "Load failed: invalid character in the marshaled string");
+ rb_raise(rb_eTypeError, "load failed: invalid character in the marshaled string");
}
m = m*10 + (unsigned long)(ch-'0');
}
@@ -230,7 +230,7 @@ BigDecimal_mode(int argc, VALUE *argv, VALUE self)
fo = VpGetException();
if(val==Qnil) return INT2FIX(fo);
if(val!=Qfalse && val!=Qtrue) {
- rb_raise(rb_eTypeError, "The second argument must be true or false.");
+ rb_raise(rb_eTypeError, "second argument must be true or false");
return Qnil; /* Not reached */
}
if(f&VP_EXCEPTION_INFINITY) {
@@ -250,13 +250,13 @@ BigDecimal_mode(int argc, VALUE *argv, VALUE self)
if(val==Qnil) return INT2FIX(fo);
Check_Type(val, T_FIXNUM);
if(!VpIsRoundMode(FIX2INT(val))) {
- rb_raise(rb_eTypeError, "Invalid rounding mode.");
+ rb_raise(rb_eTypeError, "invalid rounding mode");
return Qnil;
}
fo = VpSetRoundMode((unsigned long)FIX2INT(val));
return INT2FIX(fo);
}
- rb_raise(rb_eTypeError, "The first argument for BigDecimal#mode is invalid.");
+ rb_raise(rb_eTypeError, "first argument for BigDecimal#mode invalid");
return Qnil;
}
@@ -412,7 +412,7 @@ BigDecimal_to_f(VALUE self)
errno = 0;
d2 = pow(10.0,(double)e);
if((errno == ERANGE && e>0) || (d2>1.0 && (fabs(d) > (DBL_MAX / d2)))) {
- VpException(VP_EXCEPTION_OVERFLOW,"BigDecimal to Float conversion.",0);
+ VpException(VP_EXCEPTION_OVERFLOW,"BigDecimal to Float conversion",0);
if(d>0.0) return rb_float_new(DBL_MAX);
else return rb_float_new(-DBL_MAX);
}
@@ -940,7 +940,7 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self)
Check_Type(vRound, T_FIXNUM);
sw = FIX2INT(vRound);
if(!VpIsRoundMode(sw)) {
- rb_raise(rb_eTypeError, "Invalid rounding mode.");
+ rb_raise(rb_eTypeError, "invalid rounding mode");
return Qnil;
}
break;
@@ -3304,7 +3304,7 @@ VpCtoV(Real *a, char *int_chr, U_LONG ni, char *frac, U_LONG nf, char *exp_chr,
es = e*((S_INT)BASE_FIG);
e = e * 10 + exp_chr[i] - '0';
if(es>e*((S_INT)BASE_FIG)) {
- return VpException(VP_EXCEPTION_INFINITY,"Exponent overflow",0);
+ return VpException(VP_EXCEPTION_INFINITY,"exponent overflow",0);
}
++i;
}
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index a356568262..c56f18f0f6 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -124,7 +124,7 @@ curses_init_screen()
if (rb_stdscr) return rb_stdscr;
initscr();
if (stdscr == 0) {
- rb_raise(rb_eRuntimeError, "cannot initialize curses");
+ rb_raise(rb_eRuntimeError, "can't initialize curses");
}
clear();
rb_stdscr = prep_window(cWindow, stdscr);
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 95b6dc74dc..7a05115ec5 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -161,7 +161,7 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
Data_Get_Struct(self, struct dl_handle, dlhandle);
if (!dlhandle->open) {
- rb_raise(rb_eRuntimeError, "Closed handle.");
+ rb_raise(rb_eRuntimeError, "closed handle");
}
handle = dlhandle->ptr;
@@ -187,11 +187,11 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
if (!func)
#endif
{
- rb_raise(rb_eRuntimeError, "Unknown symbol \"%sA\".", name);
+ rb_raise(rb_eRuntimeError, "unknown symbol \"%sA\"", name);
}
}
#else
- rb_raise(rb_eRuntimeError, "Unknown symbol \"%s\".", name);
+ rb_raise(rb_eRuntimeError, "unknown symbol \"%s\"", name);
#endif
}
val = rb_dlsym_new(func, name, stype);
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index 11edd9a32f..cb5fee6aee 100644
--- a/ext/openssl/ossl_cipher.c
+++ b/ext/openssl/ossl_cipher.c
@@ -94,7 +94,7 @@ ossl_cipher_initialize(VALUE self, VALUE str)
name = StringValuePtr(str);
GetCipher(self, ctx);
if (!(cipher = EVP_get_cipherbyname(name))) {
- ossl_raise(rb_eRuntimeError, "Unsupported cipher algorithm (%s).", name);
+ ossl_raise(rb_eRuntimeError, "unsupported cipher algorithm (%s)", name);
}
if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1)
ossl_raise(eCipherError, NULL);
@@ -198,7 +198,7 @@ ossl_cipher_pkcs5_keyivgen(int argc, VALUE *argv, VALUE self)
if(!NIL_P(vsalt)){
StringValue(vsalt);
if(RSTRING(vsalt)->len != PKCS5_SALT_LEN)
- rb_raise(eCipherError, "salt must be an 8-octet string.");
+ rb_raise(eCipherError, "salt must be an 8-octet string");
salt = RSTRING(vsalt)->ptr;
}
iter = NIL_P(viter) ? 2048 : NUM2INT(viter);
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index cfd7e4854e..2a03eff6ca 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -375,7 +375,7 @@ getDevice(master,slave)
}
close(i);
}
- rb_raise(rb_eRuntimeError, "Cannot get Master/Slave device");
+ rb_raise(rb_eRuntimeError, "can't get Master/Slave device");
#else
char **p;
char MasterName[DEVICELEN];
@@ -394,7 +394,7 @@ getDevice(master,slave)
close(i);
}
}
- rb_raise(rb_eRuntimeError, "Cannot get %s", SlaveName);
+ rb_raise(rb_eRuntimeError, "can't get %s", SlaveName);
#endif
}
#endif /* HAVE__GETPTY */
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 4c7b08f514..0ac3e109cb 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -488,7 +488,7 @@ hist_get(self, index)
i += state->length;
}
if (i < 0 || i > state->length - 1) {
- rb_raise(rb_eIndexError, "Invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
return rb_tainted_str_new2(state->entries[i]->line);
}
@@ -510,7 +510,7 @@ hist_set(self, index, str)
i += state->length;
}
if (i < 0 || i > state->length - 1) {
- rb_raise(rb_eIndexError, "Invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
SafeStringValue(str);
replace_history_entry(i, RSTRING(str)->ptr, NULL);
@@ -629,7 +629,7 @@ hist_delete_at(self, index)
if (i < 0)
i += state->length;
if (i < 0 || i > state->length - 1) {
- rb_raise(rb_eIndexError, "Invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
return rb_remove_history(i);
}
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 51e0eb56ea..31420d3cf5 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1574,7 +1574,7 @@ unix_send_io(sock, val)
fd = FIX2INT(val);
}
else {
- rb_raise(rb_eTypeError, "IO nor file descriptor");
+ rb_raise(rb_eTypeError, "neither IO nor file descriptor");
}
GetOpenFile(sock, fptr);
@@ -1691,7 +1691,7 @@ unix_recv_io(argc, argv, sock)
msg.msg_accrightslen != sizeof(fd)
#endif
) {
- rb_raise(rb_eSocket, "File descriptor was not passed");
+ rb_raise(rb_eSocket, "file descriptor was not passed");
}
#if FD_PASSING_BY_MSG_CONTROL
@@ -1841,7 +1841,7 @@ setup_domain_and_type(domain, dv, type, tv)
*dv = PF_IPX;
#endif
else
- rb_raise(rb_eSocket, "Unknown socket domain %s", ptr);
+ rb_raise(rb_eSocket, "unknown socket domain %s", ptr);
}
else {
*dv = NUM2INT(domain);
@@ -1872,7 +1872,7 @@ setup_domain_and_type(domain, dv, type, tv)
*tv = SOCK_PACKET;
#endif
else
- rb_raise(rb_eSocket, "Unknown socket type %s", ptr);
+ rb_raise(rb_eSocket, "unknown socket type %s", ptr);
}
else {
*tv = NUM2INT(type);
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 227ed92305..81d3d84b9b 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -765,7 +765,7 @@ strscan_peek(self, vlen)
* s.unscan
* s.scan(/../) # => "te"
* s.scan(/\d/) # => nil
- * s.unscan # ScanError: cannot unscan: prev match had failed
+ * s.unscan # ScanError: can't unscan: prev match had failed
*/
static VALUE
strscan_peep(self, vlen)
@@ -783,7 +783,7 @@ strscan_unscan(self)
GET_SCANNER(self, p);
if (! MATCHED_P(p))
- rb_raise(ScanError, "cannot unscan: prev match had failed");
+ rb_raise(ScanError, "can't unscan: prev match had failed");
p->curr = p->prev;
CLEAR_MATCH_STATUS(p);
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 7a800986b5..5f07799785 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -72,7 +72,7 @@
#define OLEData_Get_Struct(obj, pole) {\
Data_Get_Struct(obj, struct oledata, pole);\
if(!pole->pDispatch) {\
- rb_raise(rb_eRuntimeError, "Failed to get Dispatch Interface");\
+ rb_raise(rb_eRuntimeError, "failed to get Dispatch Interface");\
}\
}
@@ -603,7 +603,7 @@ ole_initialize()
if(gOLEInitialized == Qfalse) {
hr = OleInitialize(NULL);
if(FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Fail: OLE initialize");
+ ole_raise(hr, rb_eRuntimeError, "fail: OLE initialize");
}
gOLEInitialized = Qtrue;
/*
@@ -1364,12 +1364,12 @@ ole_create_dcom(argc, argv, self)
if (!gole32)
gole32 = LoadLibrary("OLE32");
if (!gole32)
- rb_raise(rb_eRuntimeError, "Failed to load OLE32");
+ rb_raise(rb_eRuntimeError, "failed to load OLE32");
if (!gCoCreateInstanceEx)
gCoCreateInstanceEx = (FNCOCREATEINSTANCEEX*)
GetProcAddress(gole32, "CoCreateInstanceEx");
if (!gCoCreateInstanceEx)
- rb_raise(rb_eRuntimeError, "CoCreateInstanceEx is not supported in this environment.");
+ rb_raise(rb_eRuntimeError, "CoCreateInstanceEx is not supported in this environment");
rb_scan_args(argc, argv, "2*", &ole, &host, &others);
pbuf = ole_mb2wc(StringValuePtr(ole), -1);
@@ -1381,7 +1381,7 @@ ole_create_dcom(argc, argv, self)
SysFreeString(pbuf);
if (FAILED(hr))
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Unknown OLE server: `%s'",
+ "unknown OLE server: `%s'",
StringValuePtr(ole));
memset(&serverinfo, 0, sizeof(COSERVERINFO));
serverinfo.pwszName = ole_mb2wc(StringValuePtr(host), -1);
@@ -1391,7 +1391,7 @@ ole_create_dcom(argc, argv, self)
SysFreeString(serverinfo.pwszName);
if (FAILED(hr))
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to create DCOM server `%s' in `%s'",
+ "failed to create DCOM server `%s' in `%s'",
StringValuePtr(ole),
StringValuePtr(host));
@@ -1418,7 +1418,7 @@ ole_bind_obj(moniker, argc, argv, self)
hr = CreateBindCtx(0, &pBindCtx);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to create bind context");
+ "failed to create bind context");
}
pbuf = ole_mb2wc(StringValuePtr(moniker), -1);
@@ -1427,7 +1427,7 @@ ole_bind_obj(moniker, argc, argv, self)
if(FAILED(hr)) {
OLE_RELEASE(pBindCtx);
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to parse display name of moniker `%s'",
+ "failed to parse display name of moniker `%s'",
StringValuePtr(moniker));
}
hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL,
@@ -1438,7 +1438,7 @@ ole_bind_obj(moniker, argc, argv, self)
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to bind moniker `%s'",
+ "failed to bind moniker `%s'",
StringValuePtr(moniker));
}
return create_win32ole_object(self, pDispatch, argc, argv);
@@ -1495,7 +1495,7 @@ fole_s_connect(argc, argv, self)
if(FAILED(hr)) {
OLE_RELEASE(pUnknown);
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to create WIN32OLE server `%s'",
+ "failed to create WIN32OLE server `%s'",
StringValuePtr(svr_name));
}
@@ -1532,19 +1532,19 @@ fole_s_const_load(argc, argv, self)
if (TYPE(klass) != T_CLASS &&
TYPE(klass) != T_MODULE &&
TYPE(klass) != T_NIL) {
- rb_raise(rb_eTypeError, "2nd paramator must be Class or Module.");
+ rb_raise(rb_eTypeError, "2nd parameter must be Class or Module");
}
if (rb_obj_is_kind_of(ole, cWIN32OLE)) {
OLEData_Get_Struct(ole, pole);
hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch,
0, lcid, &pTypeInfo);
if(FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Failed to GetTypeInfo");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
}
hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
if(FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
- ole_raise(hr, rb_eRuntimeError, "Failed to GetContainingTypeLib");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
}
OLE_RELEASE(pTypeInfo);
if(TYPE(klass) != T_NIL) {
@@ -1564,7 +1564,7 @@ fole_s_const_load(argc, argv, self)
hr = LoadTypeLibEx(pBuf, REGKIND_NONE, &pTypeLib);
SysFreeString(pBuf);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to LoadTypeLibEx");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
if(TYPE(klass) != T_NIL) {
ole_const_load(pTypeLib, klass, self);
}
@@ -1574,7 +1574,7 @@ fole_s_const_load(argc, argv, self)
OLE_RELEASE(pTypeLib);
}
else {
- rb_raise(rb_eTypeError, "1st paramator must be WIN32OLE instance");
+ rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE instance");
}
return Qnil;
}
@@ -1720,11 +1720,11 @@ fole_s_show_help(argc, argv, self)
helpfile = target;
}
if (TYPE(helpfile) != T_STRING) {
- rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE_TYPE|WIN32OLE_METHOD).");
+ rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE_TYPE|WIN32OLE_METHOD)");
}
hwnd = ole_show_help(helpfile, helpcontext);
if(hwnd == 0) {
- rb_raise(rb_eRuntimeError, "Failed to open help file `%s'",
+ rb_raise(rb_eRuntimeError, "failed to open help file `%s'",
StringValuePtr(helpfile));
}
return Qnil;
@@ -1769,7 +1769,7 @@ fole_initialize(argc, argv, self)
SysFreeString(pBuf);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Unknown OLE server: `%s'",
+ "unknown OLE server: `%s'",
StringValuePtr(svr_name));
}
@@ -1778,7 +1778,7 @@ fole_initialize(argc, argv, self)
&IID_IDispatch, (void**)&pDispatch);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to create WIN32OLE object from `%s'",
+ "failed to create WIN32OLE object from `%s'",
StringValuePtr(svr_name));
}
@@ -1879,7 +1879,7 @@ ole_invoke(argc, argv, self, wFlags)
rb_scan_args(argc, argv, "1*", &cmd, &paramS);
OLEData_Get_Struct(self, pole);
if(!pole->pDispatch) {
- rb_raise(rb_eRuntimeError, "Failed to get dispatch interface");
+ rb_raise(rb_eRuntimeError, "failed to get dispatch interface");
}
wcmdname = ole_mb2wc(StringValuePtr(cmd), -1);
hr = pole->pDispatch->lpVtbl->GetIDsOfNames( pole->pDispatch, &IID_NULL,
@@ -1887,7 +1887,7 @@ ole_invoke(argc, argv, self, wFlags)
SysFreeString(wcmdname);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Unknown property or method `%s'",
+ "unknown property or method `%s'",
StringValuePtr(cmd));
}
@@ -1924,7 +1924,7 @@ ole_invoke(argc, argv, self, wFlags)
VariantClear(&op.dp.rgvarg[i]);
}
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to get named argument info: `%s'",
+ "failed to get named argument info: `%s'",
StringValuePtr(cmd));
}
op.dp.rgdispidNamedArgs = &(pDispID[1]);
@@ -2343,7 +2343,7 @@ ole_propertyput(self, property, value)
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Unknown property or method: `%s'",
+ "unknown property or method: `%s'",
StringValuePtr(property));
}
/* set property value */
@@ -2436,7 +2436,7 @@ fole_each(self)
if (FAILED(hr)) {
VariantClear(&result);
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to get IEnum Interface");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to get IEnum Interface");
}
if (V_VT(&result) == VT_UNKNOWN)
@@ -2449,7 +2449,7 @@ fole_each(self)
(void**)&pEnum);
if (FAILED(hr) || !pEnum) {
VariantClear(&result);
- ole_raise(hr, rb_eRuntimeError, "Failed to get IEnum Interface");
+ ole_raise(hr, rb_eRuntimeError, "failed to get IEnum Interface");
}
VariantClear(&result);
@@ -2474,7 +2474,7 @@ fole_missing(argc, argv, self)
id = rb_to_id(argv[0]);
mname = rb_id2name(id);
if(!mname) {
- rb_raise(rb_eRuntimeError, "Fail: unknown method or property");
+ rb_raise(rb_eRuntimeError, "fail: unknown method or property");
}
n = strlen(mname);
if(mname[n-1] == '=') {
@@ -2504,7 +2504,7 @@ ole_method_sub(self, pOwnerTypeInfo, pTypeInfo, name)
VALUE method = Qnil;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
for(i = 0; i < pTypeAttr->cFuncs && method == Qnil; i++) {
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, i, &pFuncDesc);
@@ -2543,7 +2543,7 @@ olemethod_from_typeinfo(self, pTypeInfo, name)
VALUE method = Qnil;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
method = ole_method_sub(self, 0, pTypeInfo, name);
if (method != Qnil) {
@@ -2579,7 +2579,7 @@ ole_methods_sub(pOwnerTypeInfo, pTypeInfo, methods, mask)
WORD i;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
for(i = 0; i < pTypeAttr->cFuncs; i++) {
pstr = NULL;
@@ -2620,7 +2620,7 @@ ole_methods_from_typeinfo(pTypeInfo, mask)
VALUE methods = rb_ary_new();
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
ole_methods_sub(0, pTypeInfo, methods, mask);
@@ -2653,7 +2653,7 @@ typeinfo_from_ole(pole, ppti)
HRESULT hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch,
0, lcid, &pTypeInfo);
if(FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Failed to GetTypeInfo");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
}
hr = pTypeInfo->lpVtbl->GetDocumentation(pTypeInfo,
-1,
@@ -2663,7 +2663,7 @@ typeinfo_from_ole(pole, ppti)
hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &i);
OLE_RELEASE(pTypeInfo);
if (FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Failed to GetContainingTypeLib");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
}
count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
for (i = 0; i < count; i++) {
@@ -2772,12 +2772,12 @@ fole_obj_help( self )
hr = pole->pDispatch->lpVtbl->GetTypeInfo( pole->pDispatch, 0, lcid, &pTypeInfo );
if(FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Failed to GetTypeInfo");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
}
hr = pTypeInfo->lpVtbl->GetContainingTypeLib( pTypeInfo, &pTypeLib, &index );
if(FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
- ole_raise(hr, rb_eRuntimeError, "Failed to GetContainingTypeLib");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
}
hr = pTypeLib->lpVtbl->GetDocumentation( pTypeLib, index,
&bstr, NULL, NULL, NULL);
@@ -3010,12 +3010,12 @@ fole_method_help( self, cmdname )
OLEData_Get_Struct(self, pole);
hr = typeinfo_from_ole(pole, &pTypeInfo);
if(FAILED(hr))
- ole_raise(hr, rb_eRuntimeError, "Failed to get ITypeInfo");
+ ole_raise(hr, rb_eRuntimeError, "failed to get ITypeInfo");
method = folemethod_s_allocate(cWIN32OLE_METHOD);
obj = olemethod_from_typeinfo(method, pTypeInfo, cmdname);
OLE_RELEASE(pTypeInfo);
if (obj == Qnil)
- rb_raise(eWIN32OLE_RUNTIME_ERROR, "Not found %s",
+ rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
StringValuePtr(cmdname));
return obj;
}
@@ -3045,7 +3045,7 @@ foletype_s_ole_classes(self, typelib)
pbuf = ole_mb2wc(StringValuePtr(file), -1);
hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to LoadTypeLibEx");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
SysFreeString(pbuf);
ole_classes_from_typelib(pTypeLib, classes);
OLE_RELEASE(pTypeLib);
@@ -3220,11 +3220,11 @@ foletype_initialize(self, typelib, oleclass)
pbuf = ole_mb2wc(StringValuePtr(file), -1);
hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to LoadTypeLibEx");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
SysFreeString(pbuf);
if (oleclass_from_typelib(self, pTypeLib, oleclass) == Qfalse) {
OLE_RELEASE(pTypeLib);
- rb_raise(eWIN32OLE_RUNTIME_ERROR, "Not found `%s` in `%s`",
+ rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found `%s` in `%s`",
StringValuePtr(oleclass), StringValuePtr(typelib));
}
OLE_RELEASE(pTypeLib);
@@ -3413,7 +3413,7 @@ ole_type_major_version(pTypeInfo)
HRESULT hr;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ver = INT2FIX(pTypeAttr->wMajorVerNum);
OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
return ver;
@@ -3442,7 +3442,7 @@ ole_type_minor_version(pTypeInfo)
HRESULT hr;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ver = INT2FIX(pTypeAttr->wMinorVerNum);
OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
return ver;
@@ -3471,7 +3471,7 @@ ole_type_typekind(pTypeInfo)
HRESULT hr;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
typekind = INT2FIX(pTypeAttr->typekind);
OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
return typekind;
@@ -3621,7 +3621,7 @@ ole_variables(pTypeInfo)
VALUE variables = rb_ary_new();
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
for(i = 0; i < pTypeAttr->cVars; i++) {
@@ -3701,7 +3701,7 @@ static ole_variable_ole_type(pTypeInfo, var_index)
VALUE type;
hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetVarDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
type = ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), Qnil);
pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
return type;
@@ -3730,7 +3730,7 @@ static ole_variable_ole_type_detail(pTypeInfo, var_index)
VALUE type = rb_ary_new();
hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetVarDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), type);
pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
return type;
@@ -3936,12 +3936,12 @@ folemethod_initialize(self, oletype, method)
Data_Get_Struct(oletype, struct oletypedata, ptype);
obj = olemethod_from_typeinfo(self, ptype->pTypeInfo, method);
if (obj == Qnil) {
- rb_raise(eWIN32OLE_RUNTIME_ERROR, "Not found %s",
+ rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
StringValuePtr(method));
}
}
else {
- rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object.");
+ rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object");
}
return obj;
}
@@ -3969,7 +3969,7 @@ ole_method_return_type(pTypeInfo, method_index)
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetFuncDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
type = ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), Qnil);
pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
@@ -4001,7 +4001,7 @@ ole_method_return_vtype(pTypeInfo, method_index)
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetFuncDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
vt = INT2FIX(pFuncDesc->elemdescFunc.tdesc.vt);
pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
@@ -4065,7 +4065,7 @@ ole_method_invkind(pTypeInfo, method_index)
VALUE invkind;
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
if(FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetFuncDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
invkind = INT2FIX(pFuncDesc->invkind);
pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
return invkind;
@@ -5267,7 +5267,7 @@ fev_initialize(argc, argv, self)
rb_scan_args(argc, argv, "11", &ole, &itf);
if (!rb_obj_is_kind_of(ole, cWIN32OLE)) {
- rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE object.");
+ rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE object");
}
if(TYPE(itf) != T_NIL) {
@@ -5294,7 +5294,7 @@ fev_initialize(argc, argv, self)
if (FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
ole_raise(hr, rb_eRuntimeError,
- "Failed to query IConnectionPointContainer");
+ "failed to query IConnectionPointContainer");
}
hr = pContainer->lpVtbl->FindConnectionPoint(pContainer,
@@ -5303,7 +5303,7 @@ fev_initialize(argc, argv, self)
OLE_RELEASE(pContainer);
if (FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
- ole_raise(hr, rb_eRuntimeError, "Failed to query IConnectionPoint");
+ ole_raise(hr, rb_eRuntimeError, "failed to query IConnectionPoint");
}
pIEV = EVENTSINK_Constructor();
pIEV->m_iid = iid;
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index b5e016eebb..98f60cbcbb 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -2995,7 +2995,7 @@ rb_gzreader_readchar(obj)
VALUE dst;
dst = rb_gzreader_getc(obj);
if (NIL_P(dst)) {
- rb_raise(rb_eEOFError, "End of file reached");
+ rb_raise(rb_eEOFError, "end of file reached");
}
return dst;
}
@@ -3177,7 +3177,7 @@ rb_gzreader_readline(argc, argv, obj)
VALUE dst;
dst = rb_gzreader_gets(argc, argv, obj);
if (NIL_P(dst)) {
- rb_raise(rb_eEOFError, "End of file reached");
+ rb_raise(rb_eEOFError, "end of file reached");
}
return dst;
}
diff --git a/hash.c b/hash.c
index 4697fd3e6d..3f1ebea9f4 100644
--- a/hash.c
+++ b/hash.c
@@ -1888,7 +1888,7 @@ env_aset(obj, nm, val)
char *name, *value;
if (rb_safe_level() >= 4) {
- rb_raise(rb_eSecurityError, "cannot change environment variable");
+ rb_raise(rb_eSecurityError, "can't change environment variable");
}
if (NIL_P(val)) {
diff --git a/io.c b/io.c
index 39eb659d11..918ebd1f01 100644
--- a/io.c
+++ b/io.c
@@ -173,7 +173,7 @@ extern int ReadDataPending();
void
rb_eof_error()
{
- rb_raise(rb_eEOFError, "End of file reached");
+ rb_raise(rb_eEOFError, "end of file reached");
}
VALUE
@@ -2412,7 +2412,7 @@ rb_io_flags_mode(flags)
}
return MODE_BINMODE("r+", "rb+");
}
- rb_raise(rb_eArgError, "illegal access mode %o", flags);
+ rb_raise(rb_eArgError, "illegal access modenum %o", flags);
return NULL; /* not reached */
}
diff --git a/marshal.c b/marshal.c
index 5323fdde25..3791c4c79a 100644
--- a/marshal.c
+++ b/marshal.c
@@ -111,7 +111,7 @@ class2path(klass)
n);
}
if (rb_path2class(n) != rb_class_real(klass)) {
- rb_raise(rb_eTypeError, "%s cannot be referred", n);
+ rb_raise(rb_eTypeError, "%s can't be referred", n);
}
return path;
}
@@ -615,7 +615,7 @@ w_object(obj, arg, limit)
}
else if (FL_TEST(obj, FL_USER2)) {
/* FL_USER2 means HASH_PROC_DEFAULT (see hash.c) */
- rb_raise(rb_eTypeError, "cannot dump hash with default proc");
+ rb_raise(rb_eTypeError, "can't dump hash with default proc");
}
else {
w_byte(TYPE_HASH_DEF, arg);
diff --git a/numeric.c b/numeric.c
index 873272e6da..eba6e59bf6 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1437,7 +1437,7 @@ num_step(argc, argv, from)
rb_raise(rb_eArgError, "wrong number of arguments");
}
if (rb_equal(step, INT2FIX(0))) {
- rb_raise(rb_eArgError, "step cannot be 0");
+ rb_raise(rb_eArgError, "step can't be 0");
}
}
diff --git a/object.c b/object.c
index e259d554d4..20c6e342fa 100644
--- a/object.c
+++ b/object.c
@@ -2046,7 +2046,7 @@ convert_type(val, tname, method, raise)
m = rb_intern(method);
if (!rb_respond_to(val, m)) {
if (raise) {
- rb_raise(rb_eTypeError, "cannot convert %s into %s",
+ rb_raise(rb_eTypeError, "can't convert %s into %s",
NIL_P(val) ? "nil" :
val == Qtrue ? "true" :
val == Qfalse ? "false" :
@@ -2285,7 +2285,7 @@ rb_Float(val)
return rb_float_new(rb_str_to_dbl(val, Qtrue));
case T_NIL:
- rb_raise(rb_eTypeError, "cannot convert nil into Float");
+ rb_raise(rb_eTypeError, "can't convert nil into Float");
break;
default:
diff --git a/pack.c b/pack.c
index 4d927052d8..a5524bcca0 100644
--- a/pack.c
+++ b/pack.c
@@ -343,7 +343,7 @@ num2i32(x)
if (TYPE(x) == T_BIGNUM) {
return rb_big2ulong_pack(x);
}
- rb_raise(rb_eTypeError, "cannot convert %s to `integer'", rb_obj_classname(x));
+ rb_raise(rb_eTypeError, "can't convert %s to `integer'", rb_obj_classname(x));
return 0; /* not reached */
}
@@ -962,7 +962,7 @@ pack_pack(ary, fmt)
{
long l = NUM2LONG(from);
if (l < 0) {
- rb_raise(rb_eArgError, "cannot compress negative numbers");
+ rb_raise(rb_eArgError, "can't compress negative numbers");
}
ul = l;
}
diff --git a/process.c b/process.c
index 8a83aed98a..530665ba1e 100644
--- a/process.c
+++ b/process.c
@@ -1817,7 +1817,7 @@ check_uid_switch()
{
rb_secure(2);
if (under_uid_switch) {
- rb_raise(rb_eRuntimeError, "can't handle UID during evaluating the block given to the Process::UID.switch method");
+ rb_raise(rb_eRuntimeError, "can't handle UID while evaluating block given to Process::UID.switch method");
}
}
@@ -1827,7 +1827,7 @@ check_gid_switch()
{
rb_secure(2);
if (under_gid_switch) {
- rb_raise(rb_eRuntimeError, "can't handle GID during evaluating the block given to the Process::UID.switch method");
+ rb_raise(rb_eRuntimeError, "can't handle GID while evaluating block given to Process::UID.switch method");
}
}
diff --git a/range.c b/range.c
index 6783eff782..a0ae98cba4 100644
--- a/range.c
+++ b/range.c
@@ -352,7 +352,7 @@ range_step(argc, argv, range)
if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
if (!rb_respond_to(b, id_succ)) {
- rb_raise(rb_eTypeError, "cannot iterate from %s",
+ rb_raise(rb_eTypeError, "can't iterate from %s",
rb_obj_classname(b));
}
@@ -400,7 +400,7 @@ range_each(range)
end = rb_ivar_get(range, id_end);
if (!rb_respond_to(beg, id_succ)) {
- rb_raise(rb_eTypeError, "cannot iterate from %s",
+ rb_raise(rb_eTypeError, "can't iterate from %s",
rb_obj_classname(beg));
}
if (FIXNUM_P(beg) && FIXNUM_P(end)) { /* fixnums are special */
diff --git a/ruby.c b/ruby.c
index 763697b2f9..9e167f6170 100644
--- a/ruby.c
+++ b/ruby.c
@@ -726,7 +726,7 @@ proc_options(argc, argv)
}
if (!*s) break;
if (!strchr("IdvwrK", *s))
- rb_raise(rb_eRuntimeError, "Illegal switch in RUBYOPT: -%c", *s);
+ rb_raise(rb_eRuntimeError, "illegal switch in RUBYOPT: -%c", *s);
s = moreswitches(s);
}
}
@@ -853,7 +853,7 @@ load_file(fname, script)
}
}
}
- rb_raise(rb_eLoadError, "No Ruby script found in input");
+ rb_raise(rb_eLoadError, "no Ruby script found in input");
}
c = rb_io_getc(f);
@@ -1046,11 +1046,11 @@ forbid_setid(s)
const char *s;
{
if (euid != uid)
- rb_raise(rb_eSecurityError, "No %s allowed while running setuid", s);
+ rb_raise(rb_eSecurityError, "no %s allowed while running setuid", s);
if (egid != gid)
- rb_raise(rb_eSecurityError, "No %s allowed while running setgid", s);
+ rb_raise(rb_eSecurityError, "no %s allowed while running setgid", s);
if (rb_safe_level() > 0)
- rb_raise(rb_eSecurityError, "No %s allowed in tainted mode", s);
+ rb_raise(rb_eSecurityError, "no %s allowed in tainted mode", s);
}
static void
diff --git a/signal.c b/signal.c
index c45d3c95f4..eebd0dd2ac 100644
--- a/signal.c
+++ b/signal.c
@@ -582,7 +582,7 @@ trap(arg)
}
#if defined(HAVE_SETITIMER)
if (sig == SIGVTALRM) {
- rb_raise(rb_eArgError, "SIGVTALRM reserved for Thread; cannot set handler");
+ rb_raise(rb_eArgError, "SIGVTALRM reserved for Thread; can't set handler");
}
#endif
if (func == SIG_DFL) {
diff --git a/sprintf.c b/sprintf.c
index 9ab87f251c..e86f3c7fb9 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -107,7 +107,7 @@ sign_bits(base, p)
(posarg = -1, GETNTHARG(n))))
#define GETNTHARG(nth) \
- ((nth >= argc) ? (rb_raise(rb_eArgError, "too few arguments."), 0) : argv[nth])
+ ((nth >= argc) ? (rb_raise(rb_eArgError, "too few arguments"), 0) : argv[nth])
#define GETASTER(val) do { \
t = p++; \