summaryrefslogtreecommitdiff
path: root/error.c
AgeCommit message (Collapse)Author
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
2008-04-26* error.c (builtin_types), gc.c (count_objects): added Complex andnobu
Rational. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* error.c (rb_eNOERROR): renamed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* error.c (builtin_types), signal.c (siglist), st.c (primes),nobu
struct.c (ref_func), time.c (months): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09fix doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-31fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* error.c (ruby_description): fixed type.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* error.c (report_bug): uses ruby_description.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-02* error.c (Init_Exception): make NameError to be subclass ofmatz
StandardError again. * error.c (Init_Exception): make SecurityError to be subclass of Exception, since it's too important to be handled implicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28* include/ruby/intern.h: export rb_ivar_foreach.akr
* include/ruby/ruby.h: modify struct RObject and RClass for optimizing T_OBJECT space. [ruby-dev:31853] (ROBJECT_LEN, ROBJECT_PTR) (RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL) (RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor defined. * variable.c: support the modified RObject and RClass. * object.c: ditto. * class.c: ditto. * gc.c: ditto. * marshal.c: ditto. * eval_method.ci: use the abstract accessor. * insns.def: ditto. * proc.c: ditto. * struct.c: ditto. * eval.c: ditto. * error.c: ditto. * vm.c: ditto. * insnhelper.ci: ditto. * ext/digest/digest.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* encoding.c: provide basic features for M17N.matz
* parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-19* eval_error.ci (get_backtrace): check the result more.nobu
[ruby-dev:31261] [ruby-bugs-12398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12* blockinlining.c: remove "yarv" prefix.ko1
* array.c, numeric.c: ditto. * insnhelper.ci, insns.def, vm_evalbody.ci: ditto. * yarvcore.c: removed. * yarvcore.h: renamed to core.h. * cont.c, debug.c, error.c, process.c, signal.c : ditto. * ext/probeprofiler/probeprofiler.c: ditto. * id.c, id.h: added. * inits.c: ditto. * compile.c: rename internal functions. * compile.h: fix debug flag. * eval.c, object.c, vm.c: remove ruby_top_self. use rb_vm_top_self() instead. * eval_intern.h, eval_load: ditto. * gc.c: rename yarv_machine_stack_mark() to rb_gc_mark_machine_stack(). * insnhelper.h: remove unused macros. * iseq.c: add iseq_compile() to create iseq object from source string. * proc.c: rename a internal function. * template/insns.inc.tmpl: remove YARV prefix. * thread.c: * vm.c (rb_iseq_eval): added. * vm.c: move some functions from yarvcore.c. * vm_dump.c: fix to remove compiler warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* include/ruby/{intern,ruby}.h, compile.[ch], error.c, eval.c,nobu
eval_load.c, gc.c, iseq.c, main.c, parse.y, re.c, ruby.c, yarvcore.[ch] (ruby_eval_tree, ruby_sourcefile, ruby_sourceline, ruby_nerrs): purge global variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* eval.c: remove ruby_current_node and change eval() prototype.ko1
fix to use rb_sourcefile/line() instead of ruby_sourcefile/line. * error.c, eval_error.ci, eval_load.c, eval_safe.ci, gc.c, include/ruby/intern.h, parse.y, process.c, ruby.c: ditto. * vm.c: fix spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* eval_*.h: rename to eval_*.ci.ko1
* common.mk: ditto. * eval_error.ci: remove ruby_set_current_source(). * error.c, eval.c, ruby.c: ditto. * eval_safe.c, proc.c: remove unused macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-01* error.c, parse.y, ruby.h (rb_compile_warn, rb_compile_warning): warnnobu
for compilation. the parser should no longer use rb_warn() and rb_warning(). [ruby-dev:30121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-04* error.c (rb_notimplement), io.c (pipe_open): removed definitenobu
articles and UNIX manual section from messages. [ruby-dev:30690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-04 * error.c (rb_notimplement): should show the name of this func,usa
not callee. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19* regparse.c, etc.: K&R to ANSI code cleanup patch from Stefanmatz
Huehner <stefan at huehner.org>. [ruby-core:10543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-08* blockinlining.c, error.c, eval.c, eval_error.h, eval_intern.h,ko1
eval_jump.h, eval_load.c, eval_safe.h, gc.c, proc.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: fix typo (rb_thead_t -> rb_thread_t). * eval_intern.h: remove unused definitions. * common.mk: fix around vm_opts.h path and remove harmful argument passed to insns2vm.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07* this commit is a result of refactoring. only renaming functions,ko1
moving definitions place, add/remove prototypes, deleting unused variables and removing yarv.h. This commit doesn't change any behavior of ruby/vm. * yarv.h, common.mk: remove yarv.h (contents are moved to yarvcore.h). * error.c, eval_intern.h: include yarvcore.h instead yarv.h * rename some functions: * debug.[ch]: debug_*() -> ruby_debug_*() * iseq.c: iseq_*() -> rb_iseq_*(), ruby_iseq_disasm() * iseq.c: node_name() -> ruby_node_name() * vm.c: yarv_check_redefinition_opt_method() -> rb_vm_check_redefinition_opt_method() * some refactoring with checking -Wall. * array.c: remove rb_ary_ptr() (unused) and remove unused local variables. * object.c: add a prototype of rb_mod_module_exec(). * eval_intern.h (ruby_cref): set it inline. * eval_load.c (rb_load), yarvcore.c: yarv_load() -> rb_load_internal(). * parse.y: add a prototype of rb_parse_in_eval() (in eval.c). * process.c: add a prototype of rb_thread_stop_timer_thread() (in thread.c). * thread.c: remove raw_gets() function (unused) and fix some format mismatch (format mismatchs have remained yet. this is todo). * thread.c (rb_thread_wait_fd_rw): fix typo on label name. * thread_pthread.ci: comment out codes with USE_THREAD_CACHE. * vm.c (rb_svar, rb_backref_get, rb_backref_get, rb_lastline_get, rb_lastline_set) : moved from yarvcore.c. * vm.c (yarv_init_redefined_flag): add a prototype and rename yarv_opt_method_table to vm_opt_method_table. * vm.c (rb_thread_eval): moved from yarvcore.c. * yarvcore.c: remove unused global variables and fix to use nsdr(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e