summaryrefslogtreecommitdiff
path: root/error.c
AgeCommit message (Collapse)Author
2010-10-12* compile.c (iseq_build_body), error.c (set_syserr, get_syserr),nobu
(syserr_initialize), gc.c (define_final, rb_gc_copy_finalizer), (run_final), hash.c (rb_hash_aref, rb_hash_lookup2), (rb_hash_fetch_m, rb_hash_clear, rb_hash_aset, eql_i), iseq.c (iseq_load, iseq_data_to_ary), marshal.c (r_symlink), thread.c (rb_thread_local_aref), variable.c (generic_ivar_remove, ivar_get, rb_const_get_0), (rb_cvar_get), vm.c (rb_vm_check_redefinition_opt_method), vm_insnhelper.c (vm_get_ev_const), vm_method.c (remove_method), ext/iconv/iconv.c (map_charset): use st_data_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* error.c (exc_to_s): use OBJ_INFECT.naruse
* error.c (name_err_to_s): ditto. * error.c (name_err_mesg_to_str): ditto. * error.c (syserr_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* error.c (syserr_initialize): taint message if mesg is givennaruse
and it is tainted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-11* error.c (syserr_initialize): use mesg's encoding when localenaruse
encoding is US-ASCII. If locale encoding is not US-ASCII, assume err has non ASCII characters. [ruby-dev:42358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-11* error.c (syserr_initialize): set the encoding of Errno::*#messagenaruse
as locale. [ruby-dev:42358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]nobu
add parent member. * error.c (rb_typeddata_inherited_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-16* error.c (rb_bug): existance of _set_abort_behavior() depends onusa
runtime version, not compiler version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-05* error.c (rb_name_err_mesg_new): guard mesg, recv and method.akr
The problem in [ruby-dev:41464] is caused because mesg is collected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-27* error.c (rb_bug): suppress the error report dialog if report_bug() tarui
is finished successfly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-24* error.c: fix wrong exception class name in rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* hash.c: Documentation: change => in call-seq to ->.marcandre
* enum.c: Documentation: whitespace fix for r27865 * error.c: ditto * file.c: ditto * io.c: ditto * load.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-16* error.c (rb_loaderror): use locale string, not ascii-8bit.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* array.c: Harmonize documentation, in particular regarding:marcandre
- methods returning enumerators - array methods and argument naming (array -> ary, an_array -> new_ary) - minor improvements, typo fixed and styling issues Other documentation errors fixed: - return value was self instead of a new array (or vice-versa) for Array#{pop,shift,permutation,repeated_permutation,keep_if} - Array#rindex was missing the form with a block. * dir.c: ditto. * enum.c: ditto. Modified Enumerable#reverse_each' documentation to clarify that #each will be finish before any element is yielded. * error.c: ditto. * gc.c: ditto. * hash.c: ditto. * io.c: ditto. IO#{codepoints,each_codepoint} fixed as per [ruby-core:23948] * numeric.c: ditto. * range.c: ditto. * string.c: ditto. * struct.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08* error.c: RDoc for subclasses of Exception. [ruby-core:28394]marcandre
* cont.c: ditto * enumerator.c: ditto * io.c: ditto * math.c: ditto * numeric.c: ditto * proc.c: ditto * re.c: ditto * thread.c: ditto * transcode.c: ditto. Thanks to Run Paint for some of the documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* error.c (name_err_mesg_to_str): preserve encoding of inspection.nobu
[ruby-core:29948] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24* error.c: include errno.h at beginning.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24* include/ruby/ruby.h (rb_bug_errno): declared.akr
* include/ruby/intern.h (rb_strerrno): declaration removed. * error.c (rb_strerrno): make it static. return NULL for unknown errors. (rb_bug_errno): defined. * thread_pthread.c: use rb_bug_errno. * signal.c (ruby_signal): use rb_bug_errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24* error.c (rb_strerrno): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24* error.c (rb_strerrno): return "UNKNOWNERROR" for non-zero unknownakr
error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24* include/ruby/intern.h (rb_strerrno): declared.akr
* template/known_errors.inc.tmpl: generate defined_error() and undefined_error() instead of set_syserr. * error.c (Init_syserr): define defined_error() and undefined_error() to follow the above change. (rb_strerrno): defined. * thread_pthread.c: show error message and errno macro name with rb_bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29* array.c (rb_ary_to_ary): do not use #respond_to? to detectmatz
to_ary. Just call. [ruby-core:23738] * eval.c (rb_check_funcall): new function with method existence check. returns Qundef when the method does not exist. * enumerator.c (enumerator_rewind): just call method, using rb_check_funcall(). [ruby-core:23738] * error.c (exc_equal): ditto. * object.c (convert_type): ditto. * error.c (rb_name_err_mesg_new): export function. * eval.c (make_exception): ditto. * io.c (pop_last_hash): return early when the last argument is nil. * io.c (rb_io_puts): treat T_STRING specially for small optimization. * vm_eval.c (raise_method_missing): skip method call if possible using rb_method_basic_definition_p(). * vm_eval.c (method_missing): ditto. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test suites changed to ignore exceptions caused by just-call policy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09* error.c (name_err_mesg_data_type): typed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09* error.c (compile_warn_print, warn_print): fixed false warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-08* error.c (rb_check_type): rejects typed data.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* include/ruby/ruby.h:ko1
rename "...TypeStruct" and "typed_struct" to "TypedData..." and "typeddata", respectively. rename rb_data_type_t#name to rb_data_type_t#wrap_struct_name. * error.c, gc.c, iseq.c, vm.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* error.c (rb_typed_struct_is_kind_of): new function to see if thenobu
given typed struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* error.c (rb_check_typed_struct): new function to check typednobu
struct. * include/ruby/ruby.h (Check_TypedStruct, Data_Get_TypedStruct): new macro to check typed struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-01* include/ruby/intern.h (rb_exc_new2): optimization for literal.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-24* error.c (syserr_initialize): errno is int.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19* io.c (rb_mWaitReadable): defined.akr
(rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18* error.c (report_bug): rb_bug can be caused by extensionnobu
libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* error.c (report_bug): message updated to better English.matz
[ruby-core:22665] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-24* error.c, vm_dump.c: change message by rb_bug().ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-24* error.c (exc_equal): == method should not raise Exception.ko1
[ruby-dev:37519] * sample/test.rb: fix test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18* error.c (exc_equal): duck typing equal to make it transitive.matz
[ruby-dev:34880] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18* error.c (Init_syserr): moved function definition itself fromnobu
template/known_errors.inc.tmpl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20* error.c (exc_equal): should not compare recursively.matz
[ruby-dev:36796] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports VMS.yugui
* error.c: ditto. * eval.c: ditto. * eval_intern.h: ditto. * include/ruby/defines.h: ditto. * include/ruby/ruby.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * vms/config.h: removed. * vms/vms.h: ditto. * vms/vmsruby_private.c: ditto. * vms/vmsruby_private.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26* error.c (Init_syserr): moved to the template.yugui
(errno_missing): removed. fixed [ruby-dev:35958]. * defs/knwon_errors.def: added. extracted from Init_syserr. * templates/known_errors.inc.tmpl: added. Template for Init_syserr. c.f. [ruby-dev:35958]. * tools/generic_erb.rb: added. general purpose mapper which maps data+template into source code. * common.mk (error.$(OBJEXT), incs, known_errors.inc): Fixed dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26* error.c (Init_Exception): introduce EncodingError which is amatz
superclass for all encoding related exception classes, e.g. Encoding::CompatibilityError. [ruby-dev:36371] * transcode.c (Init_transcode): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18* transcode.c: add "Error" suffix for Encoding exception classes.matz
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36346]. * encoding.c (Init_Encoding): rename EncodingCompatibilityError to Encoding::CompatibilityError. [ruby-dev:36366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12* error.c (rb_eEncCompatError): add Exception.naruse
* include/ruby/ruby.h: ditto. * encoding.c (rb_enc_check): use rb_eEncCompatError. * string.c (rb_enc_cr_str_buf_cat): ditto. * string.c (rb_str_sub_bang): ditto. * string.c (rb_str_hex): ditto. * string.c (rb_str_oct): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22* compile.c (insn_data_to_s_detail), file.c (rb_stat_inspect),nobu
iseq.c (ruby_iseq_disasm_insn, ruby_iseq_disasm), process.c (pst_message), re.c (match_inspect): use rb_str_catf. * dir.c (dir_inspect), iseq.c (iseq_inspect, insn_operand_intern): use rb_sprintf. * error.c (rb_name_error, rb_raise, rb_loaderror, rb_fatal): use rb_vsprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* Add coverage measurement constant COVERAGE__. This constant is notmame
for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will return an array whose elements represent number of executions per line of source code. * vm_core.h: add field of coverage array to iseq. * iseq.c (prepare_iseq_build): ditto. * insns.def (trace): update coverage array. * parse.y (coverage): create and initialize coverage array. * compile.h (ADD_TRACE): add trace instruction to update covearge array. * thread.c (clear_coverage): delete coverage array when forking. Otherwise, double count of coverage may occur. * lib/coverage.rb: sample coverage measurement tool. * error.c: distinguish explicitly between parse_in_eval and mild_compile_error. * load.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu
* *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24* error.c (exc_equal): == operator should be transitional. matz
[ruby-dev:34808] * error.c (syserr_eqq): === should be able to handle delegated objects as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e