From: Ian Macdonald Date: 2004-03-29T10:10:33+09:00 Subject: more spelling and grammar fixes --CblX+4bnyfN0pR09 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, After making some corrections to singleton.rb, I remembered that I had seen incorrectly spelt and ungrammatical exception messages in some of the modules, so I decided to go through and fix them. This patch addresses only the *.c files and fixes the errors in spelling and grammar. I have also made some of the exception messages more consistent across files, e.g. "wrong number of arguments" vs. "wrong # of arguments". I have probably missed some errors, but this is a good start. I'll get to the *.rb files later. This patch is against the latest CVS. Ian -- Ian Macdonald | Did you know that there are 71.9 acres of System Administrator | nipple tissue in the U.S.? ian@caliban.org | http://www.caliban.org | | --CblX+4bnyfN0pR09 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cleanup.diff" Index: array.c =================================================================== RCS file: /src/ruby/array.c,v retrieving revision 1.142 diff -u -r1.142 array.c --- array.c 20 Mar 2004 16:45:35 -0000 1.142 +++ array.c 29 Mar 2004 00:59:02 -0000 @@ -1774,7 +1774,7 @@ long i; if (argc > 0) { - rb_raise(rb_eArgError, "wrong number arguments (%d for 0)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } result = rb_ary_new2(RARRAY(ary)->len); for (i = 0; i < RARRAY(ary)->len; i++) { Index: class.c =================================================================== RCS file: /src/ruby/class.c,v retrieving revision 1.83 diff -u -r1.83 class.c --- class.c 19 Jan 2004 09:19:29 -0000 1.83 +++ class.c 29 Mar 2004 00:59:04 -0000 @@ -1017,7 +1017,7 @@ } if (argc > i) { - rb_raise(rb_eArgError, "wrong number of arguments(%d for %d)", argc, i); + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, i); } return argc; Index: eval.c =================================================================== RCS file: /src/ruby/eval.c,v retrieving revision 1.649 diff -u -r1.649 eval.c --- eval.c 23 Mar 2004 19:14:12 -0000 1.649 +++ eval.c 29 Mar 2004 00:59:14 -0000 @@ -3639,7 +3639,7 @@ case NODE_ATTRSET: if (ruby_frame->argc != 1) - rb_raise(rb_eArgError, "wrong number of arguments(%d for 1)", + rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", ruby_frame->argc); result = rb_ivar_set(self, node->nd_vid, ruby_frame->argv[0]); break; @@ -5333,7 +5333,7 @@ VALUE *argv; { if (len >= 0 && argc != len) { - rb_raise(rb_eArgError, "wrong number of arguments(%d for %d)", + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, len); } @@ -5484,7 +5484,7 @@ /* for attr get/set */ case NODE_IVAR: if (argc != 0) { - rb_raise(rb_eArgError, "wrong number of arguments(%d for 0)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } result = rb_attr_get(recv, body->nd_vid); break; @@ -5547,7 +5547,7 @@ i = node->nd_cnt; if (i > argc) { - rb_raise(rb_eArgError, "wrong number of arguments(%d for %d)", + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, i); } if ((int)node->nd_rest == -1) { @@ -5559,7 +5559,7 @@ optnode = optnode->nd_next; } if (opt < argc) { - rb_raise(rb_eArgError, "wrong number of arguments(%d for %d)", + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, opt); } ruby_frame->argc = opt; @@ -7196,7 +7196,7 @@ int i; if (argc == 0) { - rb_raise(rb_eArgError, "wrong number of arguments(0 for 1)"); + rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)"); } for (i=0; idmark == (RUBY_DATA_FUNC)bm_mark) { struct METHOD *method = (struct METHOD *)DATA_PTR(body); Index: file.c =================================================================== RCS file: /src/ruby/file.c,v retrieving revision 1.178 diff -u -r1.178 file.c --- file.c 4 Feb 2004 13:39:49 -0000 1.178 +++ file.c 29 Mar 2004 00:59:16 -0000 @@ -2116,7 +2116,7 @@ omask = umask(NUM2INT(argv[0])); } else { - rb_raise(rb_eArgError, "wrong number of argument"); + rb_raise(rb_eArgError, "wrong number of arguments"); } return INT2FIX(omask); } @@ -2996,7 +2996,7 @@ int i; n+=1; - if (n != argc) rb_raise(rb_eArgError, "wrong number of arguments(%d for %d)", argc, n); + if (n != argc) rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, n); for (i=1; i 0) { - rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } result = rb_ary_new(); rb_hash_foreach(hash, select_i, result); @@ -2019,7 +2019,7 @@ char **env; if (argc > 0) { - rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } result = rb_ary_new(); env = GET_ENVIRON(environ); Index: re.c =================================================================== RCS file: /src/ruby/re.c,v retrieving revision 1.122 diff -u -r1.122 re.c --- re.c 5 Mar 2004 22:37:35 -0000 1.122 +++ re.c 29 Mar 2004 00:59:32 -0000 @@ -1256,7 +1256,7 @@ VALUE match; { if (argc > 0) { - rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } else { struct re_registers *regs = RMATCH(match)->regs; @@ -1657,7 +1657,7 @@ rb_check_frozen(self); if (argc == 0 || argc > 3) { - rb_raise(rb_eArgError, "wrong number of argument"); + rb_raise(rb_eArgError, "wrong number of arguments"); } if (TYPE(argv[0]) == T_REGEXP) { if (argc > 1) { Index: sprintf.c =================================================================== RCS file: /src/ruby/sprintf.c,v retrieving revision 1.38 diff -u -r1.38 sprintf.c --- sprintf.c 20 Feb 2004 10:03:34 -0000 1.38 +++ sprintf.c 29 Mar 2004 00:59:42 -0000 @@ -108,7 +108,7 @@ (posarg = -1, GETNTHARG(n)))) #define GETNTHARG(nth) \ - ((nth >= argc) ? (rb_raise(rb_eArgError, "too few argument."), 0) : argv[nth]) + ((nth >= argc) ? (rb_raise(rb_eArgError, "too few arguments."), 0) : argv[nth]) #define GETASTER(val) do { \ t = p++; \ @@ -716,7 +716,7 @@ * the format string may contain `n$'-style argument selector. */ if (RTEST(ruby_verbose) && nextarg < argc) { - rb_raise(rb_eArgError, "too many argument for format string"); + rb_raise(rb_eArgError, "too many arguments for format string"); } #endif rb_str_resize(result, blen); Index: string.c =================================================================== RCS file: /src/ruby/string.c,v retrieving revision 1.188 diff -u -r1.188 string.c --- string.c 15 Mar 2004 02:27:29 -0000 1.188 +++ string.c 29 Mar 2004 00:59:44 -0000 @@ -1566,7 +1566,7 @@ return rb_str_substr(str, NUM2LONG(argv[0]), NUM2LONG(argv[1])); } if (argc != 1) { - rb_raise(rb_eArgError, "wrong number of arguments(%d for 1)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc); } return rb_str_aref(str, argv[0]); } @@ -1760,7 +1760,7 @@ return argv[2]; } if (argc != 2) { - rb_raise(rb_eArgError, "wrong number of arguments(%d for 2)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc); } return rb_str_aset(str, argv[0], argv[1]); } @@ -1833,7 +1833,7 @@ int i; if (argc < 1 || 2 < argc) { - rb_raise(rb_eArgError, "wrong number of arguments(%d for 1)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc); } for (i=0; i 0) { - rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } result = rb_ary_new(); for (i = 0; i < RSTRUCT(s)->len; i++) { Index: time.c =================================================================== RCS file: /src/ruby/time.c,v retrieving revision 1.95 diff -u -r1.95 time.c --- time.c 18 Jan 2004 14:16:47 -0000 1.95 +++ time.c 29 Mar 2004 00:59:46 -0000 @@ -1816,7 +1816,7 @@ tm = gmtime(&t); if ((tm->tm_year & 0x1ffff) != tm->tm_year) - rb_raise(rb_eArgError, "too big year to marshal"); + rb_raise(rb_eArgError, "year too big to marshal"); p = 0x1 << 31 | /* 1 */ tm->tm_year << 14 | /* 17 */ Index: ext/iconv/iconv.c =================================================================== RCS file: /src/ruby/ext/iconv/iconv.c,v retrieving revision 1.18 diff -u -r1.18 iconv.c --- ext/iconv/iconv.c 16 Feb 2004 03:29:16 -0000 1.18 +++ ext/iconv/iconv.c 29 Mar 2004 01:00:01 -0000 @@ -601,7 +601,7 @@ struct iconv_env_t arg; if (argc < 2) /* needs `to' and `from' arguments at least */ - rb_raise(rb_eArgError, "wrong # of arguments (%d for %d)", argc, 2); + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, 2); arg.argc = argc -= 2; arg.argv = argv + 2; Index: ext/openssl/ossl.c =================================================================== RCS file: /src/ruby/ext/openssl/ossl.c,v retrieving revision 1.11 diff -u -r1.11 ossl.c --- ext/openssl/ossl.c 11 Dec 2003 12:29:08 -0000 1.11 +++ ext/openssl/ossl.c 29 Mar 2004 01:00:04 -0000 @@ -63,7 +63,7 @@ val = rb_ary_entry(ary, i); if (!rb_obj_is_kind_of(val, cX509Cert)) { sk_X509_pop_free(sk, X509_free); - ossl_raise(eOSSLError, "object except X509 cert is in array"); + ossl_raise(eOSSLError, "object not X509 cert in array"); } x509 = DupX509CertPtr(val); /* NEED TO DUP */ sk_X509_push(sk, x509); Index: ext/openssl/ossl_asn1.c =================================================================== RCS file: /src/ruby/ext/openssl/ossl_asn1.c,v retrieving revision 1.5 diff -u -r1.5 ossl_asn1.c --- ext/openssl/ossl_asn1.c 4 Dec 2003 00:21:31 -0000 1.5 +++ ext/openssl/ossl_asn1.c 29 Mar 2004 01:00:04 -0000 @@ -567,7 +567,7 @@ return i; } } - ossl_raise(eASN1Error, "not found universal tag for %s", + ossl_raise(eASN1Error, "universal tag for %s not found", rb_class2name(CLASS_OF(obj))); return -1; /* dummy */ @@ -650,7 +650,7 @@ if(!SYMBOL_P(tag_class)) ossl_raise(eASN1Error, "invalid tag class"); if((SYM2ID(tag_class) == sUNIVERSAL) && NUM2INT(tag) > 31) - ossl_raise(eASN1Error, "too large tag number for Universal"); + ossl_raise(eASN1Error, "tag number for Universal too large"); ossl_asn1_set_tag(self, tag); ossl_asn1_set_value(self, value); ossl_asn1_set_tag_class(self, tag_class); @@ -865,13 +865,13 @@ if(NIL_P(tagging)) tagging = ID2SYM(sEXPLICIT); if(!SYMBOL_P(tagging)) - ossl_raise(eASN1Error, "invelid tag default"); + ossl_raise(eASN1Error, "invalid tag default"); if(NIL_P(tag_class)) tag_class = ID2SYM(sCONTEXT_SPECIFIC); if(!SYMBOL_P(tag_class)) - ossl_raise(eASN1Error, "invelid tag class"); + ossl_raise(eASN1Error, "invalid tag class"); if(SYM2ID(tagging) == sIMPLICIT && NUM2INT(tag) > 31) - ossl_raise(eASN1Error, "too large tag number for Universal"); + ossl_raise(eASN1Error, "tag number for Universal too large"); } else{ tag = INT2NUM(ossl_asn1_default_tag(self)); Index: ext/openssl/ossl_config.c =================================================================== RCS file: /src/ruby/ext/openssl/ossl_config.c,v retrieving revision 1.9 diff -u -r1.9 ossl_config.c --- ext/openssl/ossl_config.c 23 Feb 2004 18:45:41 -0000 1.9 +++ ext/openssl/ossl_config.c 29 Mar 2004 01:00:05 -0000 @@ -147,7 +147,7 @@ } } #ifdef OSSL_NO_CONF_API - else rb_raise(rb_eArgError, "wrong number of arguments(0 for 1)"); + else rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)"); #else else _CONF_new_data(conf); #endif Index: ext/openssl/ossl_pkcs7.c =================================================================== RCS file: /src/ruby/ext/openssl/ossl_pkcs7.c,v retrieving revision 1.5 diff -u -r1.5 ossl_pkcs7.c --- ext/openssl/ossl_pkcs7.c 11 Nov 2003 21:20:20 -0000 1.5 +++ ext/openssl/ossl_pkcs7.c 29 Mar 2004 01:00:07 -0000 @@ -358,7 +358,7 @@ GetPKCS7(self, p7); if(flag != Qtrue && flag != Qfalse) - ossl_raise(ePKCS7Error, "must secify a boolean"); + ossl_raise(ePKCS7Error, "must specify a boolean"); if(!PKCS7_set_detached(p7, flag == Qtrue ? 1 : 0)) ossl_raise(ePKCS7Error, NULL); Index: ext/racc/cparse/cparse.c =================================================================== RCS file: /src/ruby/ext/racc/cparse/cparse.c,v retrieving revision 1.9 diff -u -r1.9 cparse.c --- ext/racc/cparse/cparse.c 3 Nov 2003 13:55:01 -0000 1.9 +++ ext/racc/cparse/cparse.c 29 Mar 2004 01:00:12 -0000 @@ -733,7 +733,7 @@ /* calculate transition state */ if (RARRAY(v->state)->len == 0) - rb_raise(RaccBug, "state stack unexpected empty"); + rb_raise(RaccBug, "state stack unexpectedly empty"); k2 = num_to_long(LAST_I(v->state)); k1 = num_to_long(reduce_to) - v->nt_base; D_printf("(goto) k1=%ld\n", k1); Index: ext/readline/readline.c =================================================================== RCS file: /src/ruby/ext/readline/readline.c,v retrieving revision 1.16 diff -u -r1.16 readline.c --- ext/readline/readline.c 26 Jul 2003 15:03:14 -0000 1.16 +++ ext/readline/readline.c 29 Mar 2004 01:00:12 -0000 @@ -83,7 +83,7 @@ VALUE proc; { if (!rb_respond_to(proc, rb_intern("call"))) - rb_raise(rb_eArgError, "argument have to respond to `call'"); + rb_raise(rb_eArgError, "argument must respond to `call'"); return rb_iv_set(mReadline, COMPLETION_PROC, proc); } Index: ext/sdbm/init.c =================================================================== RCS file: /src/ruby/ext/sdbm/init.c,v retrieving revision 1.18 diff -u -r1.18 init.c --- ext/sdbm/init.c 6 May 2003 06:51:31 -0000 1.18 +++ ext/sdbm/init.c 29 Mar 2004 01:00:13 -0000 @@ -227,7 +227,7 @@ struct dbmdata *dbmp; if (argc > 0) { - rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } GetDBM(obj, dbmp); dbm = dbmp->di_dbm; Index: ext/socket/socket.c =================================================================== RCS file: /src/ruby/ext/socket/socket.c,v retrieving revision 1.114 diff -u -r1.114 socket.c --- ext/socket/socket.c 10 Mar 2004 07:05:11 -0000 1.114 +++ ext/socket/socket.c 29 Mar 2004 01:00:16 -0000 @@ -210,7 +210,7 @@ OpenFile *fptr; if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) { - rb_raise(rb_eSecurityError, "Insecure: can't shutdown socket"); + rb_raise(rb_eSecurityError, "Insecure: can't shut down socket"); } rb_scan_args(argc, argv, "01", &howto); if (howto == Qnil) @@ -1536,7 +1536,7 @@ fd = FIX2INT(val); } else { - rb_raise(rb_eTypeError, "IO nor file descriptor"); + rb_raise(rb_eTypeError, "IO not file descriptor"); } GetOpenFile(sock, fptr); Index: ext/stringio/stringio.c =================================================================== RCS file: /src/ruby/ext/stringio/stringio.c,v retrieving revision 1.27 diff -u -r1.27 stringio.c --- ext/stringio/stringio.c 28 Dec 2003 11:27:42 -0000 1.27 +++ ext/stringio/stringio.c 29 Mar 2004 01:00:17 -0000 @@ -879,7 +879,7 @@ } break; default: - rb_raise(rb_eArgError, "wrong number arguments (%d for 0)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } if (NIL_P(str)) { str = rb_str_substr(ptr->string, ptr->pos, len); Index: ext/syslog/syslog.c =================================================================== RCS file: /src/ruby/ext/syslog/syslog.c,v retrieving revision 1.8 diff -u -r1.8 syslog.c --- ext/syslog/syslog.c 22 Nov 2003 03:59:45 -0000 1.8 +++ ext/syslog/syslog.c 29 Mar 2004 01:00:24 -0000 @@ -146,7 +146,7 @@ VALUE pri; if (argc < 2) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2+)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 2+)", argc); } argc--; Index: ext/tcltklib/tcltklib.c =================================================================== RCS file: /src/ruby/ext/tcltklib/tcltklib.c,v retrieving revision 1.51 diff -u -r1.51 tcltklib.c --- ext/tcltklib/tcltklib.c 26 Jan 2004 03:49:11 -0000 1.51 +++ ext/tcltklib/tcltklib.c 29 Mar 2004 01:00:25 -0000 @@ -811,7 +811,7 @@ /* ruby command has 1 arg. */ if (argc != 2) { - rb_raise(rb_eArgError, "wrong # of arguments (%d for 1)", argc); + rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc); } /* get C string from Tcl object */ Index: ext/win32ole/win32ole.c =================================================================== RCS file: /src/ruby/ext/win32ole/win32ole.c,v retrieving revision 1.20 diff -u -r1.20 win32ole.c --- ext/win32ole/win32ole.c 18 Feb 2004 08:20:14 -0000 1.20 +++ ext/win32ole/win32ole.c 29 Mar 2004 01:00:54 -0000 @@ -73,7 +73,7 @@ #define OLEData_Get_Struct(obj, pole) {\ Data_Get_Struct(obj, struct oledata, pole);\ if(!pole->pDispatch) {\ - rb_raise(rb_eRuntimeError, "Fail to get Dispatch Interface");\ + rb_raise(rb_eRuntimeError, failed to get Dispatch Interface");\ }\ } @@ -769,7 +769,7 @@ if(pub) free(pub); if(psab) free(psab); if(pid) free(pid); - rb_raise(rb_eRuntimeError, "memory allocate error"); + rb_raise(rb_eRuntimeError, "memory allocation error"); } val1 = val; i = 0; @@ -907,7 +907,7 @@ if(pID) free(pID); if(pLB) free(pLB); if(pUB) free(pUB); - rb_raise(rb_eRuntimeError, "memory allocate error"); + rb_raise(rb_eRuntimeError, "memory allocation error"); } obj = Qnil; @@ -1361,7 +1361,7 @@ if (!gole32) gole32 = LoadLibrary("OLE32"); if (!gole32) - rb_raise(rb_eRuntimeError, "Fail to load OLE32."); + rb_raise(rb_eRuntimeError, failed to load OLE32."); if (!gCoCreateInstanceEx) gCoCreateInstanceEx = (FNCOCREATEINSTANCEEX*) GetProcAddress(gole32, "CoCreateInstanceEx"); @@ -1388,7 +1388,7 @@ SysFreeString(serverinfo.pwszName); if (FAILED(hr)) ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, - "Fail to create DCOM server : `%s' in `%s'", + failed to create DCOM server : `%s' in `%s'", StringValuePtr(ole), StringValuePtr(host)); @@ -1415,7 +1415,7 @@ hr = CreateBindCtx(0, &pBindCtx); if(FAILED(hr)) { ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, - "Fail to create bind context"); + failed to create bind context"); } pbuf = ole_mb2wc(StringValuePtr(moniker), -1); @@ -1492,7 +1492,7 @@ if(FAILED(hr)) { OLE_RELEASE(pUnknown); ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, - "Fail to create WIN32OLE server : `%s'", + failed to create WIN32OLE server : `%s'", StringValuePtr(svr_name)); } @@ -1536,12 +1536,12 @@ hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch, 0, lcid, &pTypeInfo); if(FAILED(hr)) { - ole_raise(hr, rb_eRuntimeError, "fail 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, "fail to GetContainingTypeLib"); + ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib"); } OLE_RELEASE(pTypeInfo); if(TYPE(klass) != T_NIL) { @@ -1561,7 +1561,7 @@ hr = LoadTypeLibEx(pBuf, REGKIND_NONE, &pTypeLib); SysFreeString(pBuf); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to LoadTypeLibEx"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to LoadTypeLibEx"); if(TYPE(klass) != T_NIL) { ole_const_load(pTypeLib, klass, self); } @@ -1717,11 +1717,11 @@ helpfile = target; } if (TYPE(helpfile) != T_STRING) { - rb_raise(rb_eTypeError, "1st parametor 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, "fail to open help file:%s", + rb_raise(rb_eRuntimeError, "failed to open help file:%s", StringValuePtr(helpfile)); } return Qnil; @@ -1775,7 +1775,7 @@ &IID_IDispatch, (void**)&pDispatch); if(FAILED(hr)) { ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, - "Fail to create WIN32OLE object from `%s'", + failed to create WIN32OLE object from `%s'", StringValuePtr(svr_name)); } @@ -1876,7 +1876,7 @@ rb_scan_args(argc, argv, "1*", &cmd, ¶mS); OLEData_Get_Struct(self, pole); if(!pole->pDispatch) { - rb_raise(rb_eRuntimeError, "Fail 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, @@ -2431,7 +2431,7 @@ if (FAILED(hr)) { VariantClear(&result); - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to get IEnum Interface"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to get IEnum Interface"); } if (V_VT(&result) == VT_UNKNOWN) @@ -2444,7 +2444,7 @@ (void**)&pEnum); if (FAILED(hr) || !pEnum) { VariantClear(&result); - ole_raise(hr, rb_eRuntimeError, "Fail to get IEnum Interface"); + ole_raise(hr, rb_eRuntimeError, failed to get IEnum Interface"); } VariantClear(&result); @@ -2499,7 +2499,7 @@ VALUE method = Qnil; hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr); if (FAILED(hr)) { - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail 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); @@ -2538,7 +2538,7 @@ VALUE method = Qnil; hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr); if (FAILED(hr)) { - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetTypeAttr"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetTypeAttr"); } method = ole_method_sub(self, 0, pTypeInfo, name); if (method != Qnil) { @@ -2574,7 +2574,7 @@ WORD i; hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr); if (FAILED(hr)) { - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetTypeAttr"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetTypeAttr"); } for(i = 0; i < pTypeAttr->cFuncs; i++) { pstr = NULL; @@ -2615,7 +2615,7 @@ VALUE methods = rb_ary_new(); hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr); if (FAILED(hr)) { - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetTypeAttr"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetTypeAttr"); } ole_methods_sub(0, pTypeInfo, methods, mask); @@ -2648,7 +2648,7 @@ HRESULT hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch, 0, lcid, &pTypeInfo); if(FAILED(hr)) { - ole_raise(hr, rb_eRuntimeError, "fail to GetTypeInfo"); + ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo"); } hr = pTypeInfo->lpVtbl->GetDocumentation(pTypeInfo, -1, @@ -2658,7 +2658,7 @@ hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &i); OLE_RELEASE(pTypeInfo); if (FAILED(hr)) { - ole_raise(hr, rb_eRuntimeError, "fail to GetContainingTypeLib"); + ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib"); } count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib); for (i = 0; i < count; i++) { @@ -2773,12 +2773,12 @@ hr = pole->pDispatch->lpVtbl->GetTypeInfo( pole->pDispatch, 0, lcid, &pTypeInfo ); if(FAILED(hr)) { - ole_raise(hr, rb_eRuntimeError, "fail 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, "fail to GetContainingTypeLib"); + ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib"); } hr = pTypeLib->lpVtbl->GetDocumentation( pTypeLib, index, &bstr, NULL, NULL, NULL); @@ -3011,7 +3011,7 @@ OLEData_Get_Struct(self, pole); hr = typeinfo_from_ole(pole, &pTypeInfo); if(FAILED(hr)) - ole_raise(hr, rb_eRuntimeError, "fail 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); @@ -3046,7 +3046,7 @@ pbuf = ole_mb2wc(StringValuePtr(file), -1); hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to LoadTypeLibEx"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to LoadTypeLibEx"); SysFreeString(pbuf); ole_classes_from_typelib(pTypeLib, classes); OLE_RELEASE(pTypeLib); @@ -3221,7 +3221,7 @@ pbuf = ole_mb2wc(StringValuePtr(file), -1); hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to LoadTypeLibEx"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to LoadTypeLibEx"); SysFreeString(pbuf); if (oleclass_from_typelib(self, pTypeLib, oleclass) == Qfalse) { OLE_RELEASE(pTypeLib); @@ -3414,7 +3414,7 @@ HRESULT hr; hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetTypeAttr"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetTypeAttr"); ver = INT2FIX(pTypeAttr->wMajorVerNum); OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr); return ver; @@ -3443,7 +3443,7 @@ HRESULT hr; hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetTypeAttr"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetTypeAttr"); ver = INT2FIX(pTypeAttr->wMinorVerNum); OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr); return ver; @@ -3472,7 +3472,7 @@ HRESULT hr; hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetTypeAttr"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetTypeAttr"); typekind = INT2FIX(pTypeAttr->typekind); OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr); return typekind; @@ -3622,7 +3622,7 @@ VALUE variables = rb_ary_new(); hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr); if (FAILED(hr)) { - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetTypeAttr"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetTypeAttr"); } for(i = 0; i < pTypeAttr->cVars; i++) { @@ -3702,7 +3702,7 @@ VALUE type; hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail 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; @@ -3731,7 +3731,7 @@ VALUE type = rb_ary_new(); hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail 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; @@ -3970,7 +3970,7 @@ hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetFuncDesc"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetFuncDesc"); type = ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), Qnil); pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc); @@ -4002,7 +4002,7 @@ hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc); if (FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetFuncDesc"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetFuncDesc"); vt = INT2FIX(pFuncDesc->elemdescFunc.tdesc.vt); pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc); @@ -4066,7 +4066,7 @@ VALUE invkind; hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc); if(FAILED(hr)) - ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetFuncDesc"); + ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, failed to GetFuncDesc"); invkind = INT2FIX(pFuncDesc->invkind); pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc); return invkind; @@ -5269,7 +5269,7 @@ rb_scan_args(argc, argv, "11", &ole, &itf); if (!rb_obj_is_kind_of(ole, cWIN32OLE)) { - rb_raise(rb_eTypeError, "1st parametor must be WIN32OLE object."); + rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE object."); } if(TYPE(itf) != T_NIL) { @@ -5285,7 +5285,7 @@ hr = find_default_source(ole, &iid, &pTypeInfo); } if (FAILED(hr)) { - ole_raise(hr, rb_eRuntimeError, "not found interface"); + ole_raise(hr, rb_eRuntimeError, "interface not found"); } OLEData_Get_Struct(ole, pole); @@ -5296,7 +5296,7 @@ if (FAILED(hr)) { OLE_RELEASE(pTypeInfo); ole_raise(hr, rb_eRuntimeError, - "fail to query IConnectionPointContainer"); + "failed to query IConnectionPointContainer"); } hr = pContainer->lpVtbl->FindConnectionPoint(pContainer, @@ -5305,7 +5305,7 @@ OLE_RELEASE(pContainer); if (FAILED(hr)) { OLE_RELEASE(pTypeInfo); - ole_raise(hr, rb_eRuntimeError, "fail to query IConnectionPoint"); + ole_raise(hr, rb_eRuntimeError, "failed to query IConnectionPoint"); } pIEV = EVENTSINK_Constructor(); pIEV->m_iid = iid; --CblX+4bnyfN0pR09--