summaryrefslogtreecommitdiff
path: root/error.c
AgeCommit message (Collapse)Author
2011-07-23* error.c (rb_name_error_str): new function to raise NameErrornobu
with the name string but not ID. * object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-17* error.c (rb_check_trusted): new function to check an object isnobu
trusted. * struct.c (rb_struct_modify), time.c (time_modify): check by the above function to show proper class names. [Bug #5036] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-17* error.c (rb_warn_m): accept multiple args in like puts. rdocnobu
patch by Erik Price at [ruby-core:38119]. [Feature #5029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08* error.c (rb_bug): get rid of segfault after all threadsnobu
disposed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30* error.c, thread_pthread.c (WRITE_CONST): suppress warningsnobu
`ignoring return value'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 * lib/cmath.rb: Hide handle_no_method_error from RDoc.drbrain
* error.c: Document or hide undocumented error classes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-28* error.c (rb_async_bug_errno): async-safe bug report function.ko1
In timer thread, signal handler shoul use it. The patch is contributed by Eric Wong <normalperson@yhbt.net>. Refs: [ruby-core:37644] and [ruby-core:37647] * thread_pthread.c: use rb_async_bug_errno(). And replace all fprintf() to write(). * internal.h (rb_async_bug_errno): add decl. of above func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* internal.h: declare internal functions here.akr
* node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-20* prevent temporary objects from GC, and should not usenobu
RSTRING_PTR() for function calls since it evaluates the argument a couple of times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24* error.c (rb_invalid_str): prevent intermediate variable from GC.nobu
[ruby-core:34820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-12Exception#to_s should actually call to_s.ryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05Error#to_s should ensure that the value returned is a string.ryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-28 * re.c (rb_reg_expr_str): need to escape if the coderage is invalid.usa
* error.c, include/ruby/intern.h (rb_compile_error_with_enc): new function to raise syntax error, with source encoding'ed message. * parse.y (compile_error): use above function. [ruby-core:33951] (#4217) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-23* error.c (rb_check_type): check for type from extensions for rubynobu
1.8. see [ruby-core:33797]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-20 * error.c: Fix build error for win32. This regression waskosaki
introduced by r30271. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-20 * error.c (exit_success_p): Check status code more carefully.kosaki
status code may have garbage in upper bit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-12* encoding.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08* error.c (rb_syserr_new): new function to make SystemCallErrornobu
instance without errno. [EXPERIMENTAL] * error.c (rb_syserr_fail, rb_mod_syserr_fail): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-24* include/ruby/intern.h (rb_check_frozen): optimize.nobu
[ruby-core:32878] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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