summaryrefslogtreecommitdiff
path: root/error.c
AgeCommit message (Collapse)Author
2015-06-25error.c: remove singleton methodnobu
* error.c (rb_name_err_mesg_new): remove singleton method, and unused argument. * vm_eval.c (make_no_method_exception): call rb_name_err_mesg_new directly instead of constant lookup and method invocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-23error.c: ArgumentError if no receivernobu
* error.c (name_err_receiver): raise ArgumentError if no receiver is available on this exception object. [Feature #10881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-23error.c: index numbersnobu
* error.c (rb_name_err_mesg_new, name_err_mesg_to_str): name magic numbers of indexes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18error.c: NameError#receivernobu
* error.c (name_err_receiver): add NameError#receiver method. [Feature #10881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16wrapper object before allocnobu
* error.c (rb_name_err_mesg_new): new wrapper object before allocate data area and get rid of potential memory leak. GC guards are no longer needed. * file.c (stat_new_0): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-12vm_dump.c: statement for crash report lognobu
* vm_dump.c (preface_dump): move the statement to include crash report log file from REPORTBUG_MSG in error.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-30error.c: update builtin_typesnobu
* error.c (builtin_types): update for r49932, insert T_IMEMO and move T_UNDEF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-23eval.c: static IDsnobu
* eval.c (ruby_static_id_signo, ruby_static_id_status): add static IDs, signo and status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-23error.c: predefined IDsnobu
* error.c (id_bt, id_bt_locations): use IDs predefined in id.h. * vm_args.c (raise_argument_error): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-22error.c: use static IDsnobu
* error.c: use rb_ivar_set with static IDs instead of rb_iv_set with strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16use rb_funcallvnobu
* use rb_funcallv() for no arguments call instead of variadic rb_funcall(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16error.c: use static IDsnobu
* error.c (Init_Exception): initialize static IDs first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06error.c: rb_sys_enc_warningnobu
* error.c (rb_sys_enc_warning): new function to show warning and error message with the encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06error.c: warning_stringnobu
* error.c (warning_string): extract a method to create warning message string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-03error.c: fix r49479nobu
* error.c (rb_mod_sys_fail_str): copy the given format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-03remove duplication in warningnobu
* dir.c (sys_warning_1): remove duplication in the message. * error.c (rb_mod_sys_fail_str): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24ruby.h: parent in rb_data_type_tnobu
* ruby.h (rb_data_type_t): revert r48647 and revise parent member. [ruby-core:66969] [Bug #10621] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01use 0 for reservednobu
use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29ruby.h: no parent in rb_data_type_tnobu
* error.c (rb_typeddata_is_kind_of, rb_check_typeddata): ditto. * error.c (rb_typeddata_inherited_p): deprecate. still keep for potential binary compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29error.c: simplify message buildingnobu
* error.c (syserr_initialize): simplify message building and get rid of potential invalid byte sequence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-25rb_id2str over rb_id2namenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16id.def: move IDs for exceptionnobu
* defs/id.def: add :mesg and :exception and move from other sources. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* internal.h: Include ruby.h and ruby/encoding.h to beakr
includable without prior inclusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15vm_eval.c: UncaughtThrowErrornobu
* vm_eval.c (rb_throw_obj): throw UncaughtThrowError instead of ArgumentError. [Feature #10480] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-20error.c: check if EWOULDBLOCK is definednobu
* error.c (set_syserr): EWOULDBLOCK may not be defined, check if defined first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-14* error.c: [DOC] Fix case of type in exception message by @tricknoteszzak
[Fixes GH-740] https://github.com/ruby/ruby/pull/740 * object.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-06* error.c: update exception tree. [DOC]usa
reported by @hemge via twitter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-19error.c: preserve encodingnobu
* error.c (rb_error_frozen_object): preserve encoding of class name in error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-03Init functions don't need ID cachesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-02encoding.h: constify rb_encodingnobu
* include/ruby/encoding.h: constify `rb_encoding` itself, not only arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-01constify rb_encoding and OnigEncodingnobu
* include/ruby/encoding.h: constify `rb_encoding` arguments. * include/ruby/oniguruma.h: constify `OnigEncoding` arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-25report bug with machine regisitersnobu
* error.c (rb_bug_context): new function to report bug with context. * vm_dump.c (rb_vm_bugreport): accepts `ucontext_t` argument to dump machine regisiters. based on [GH-584]. * signal.c (sigbus, sigsegv): dump machine regisiters if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12error.c: Crash Report lognobu
* error.c (REPORTBUG_MSG): mention about Crash Report log file on MacOS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-03* error.c: [DOC] Exception#cause may return nil. [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-31* error.c: [DOC] Document Exception#cause by @jasonrclark [ci skip]zzak
[Fixes GH-519] https://github.com/ruby/ruby/pull/519 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13* error.c: add Exception#backtrace_locations.ko1
Now, there are no setter and independent from Exception#backtrace. [Feature #8960] * eval.c (setup_exception): set backtrace locations for `bt_location' special attribute. * vm_backtrace.c (rb_backtrace_to_location_ary): added. * internal.h: ditto. * test/ruby/test_backtrace.rb: add a test for Exception#backtrace_locations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-10error.c: Exception#causenobu
* error.c (exc_cause): captured previous exception. * eval.c (make_exception): capture previous exception automagically. [Feature #8257] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko1
safe functions during garbage collection such as xfree(). On default, T_DATA objects are freed at same points as fianlizers. This approach protects issues such as reported by [ruby-dev:35578]. However, freeing T_DATA objects immediately helps heap usage. Most of T_DATA (in other words, most of dfree functions) are safe. However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default for safety. * cont.c: ditto. * dir.c: ditto. * encoding.c: ditto. * enumerator.c: ditto. * error.c: ditto. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * iseq.c: ditto. * marshal.c: ditto. * parse.y: ditto. * proc.c: ditto. * process.c: ditto. * random.c: ditto. * thread.c: ditto. * time.c: ditto. * transcode.c: ditto. * variable.c: ditto. * vm.c: ditto. * vm_backtrace.c: ditto. * vm_trace.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * ext/objspace/objspace.c: ditto. * ext/stringio/stringio.c: ditto. * ext/strscan/strscan.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28error.c: remove NameError#to_snobu
* error.c (name_err_to_s): remove no longer needed overriding, since r30455 which made exc_to_s almost same. Fixes [GH-413]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-20internal.h: rb_syserr_fail_pathnobu
* error.c (rb_syserr_fail_path_in): new function split from rb_sys_fail_path_in to raise SystemCallError without errno. * internal.h (rb_syserr_fail_path): like rb_sys_fail_path but without errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16* error.c (rb_bug_reporter_add): return simply 0 if failed.ko1
Please check return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16* error.c, internal.h (rb_bug_reporter_add): add a new C-API.ko1
rb_bug_reporter_add() allows to register a function which is called at rb_bug() called. * ext/-test-/bug_reporter/bug_reporter.c: add a test for this C-API. * ext/-test-/bug_reporter/extconf.rb: ditto. * test/-ext-/bug_reporter/test_bug_reporter.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03Revert r42800 "* error.c: [DOC] Update bug tracker url by @ScotterC [Fixes ↵naruse
GH-390]" It should be fixed on www.ruby-lang.org side. * [Bug #8854] * ruby/www.ruby-lang.org#288 https://github.com/ruby/www.ruby-lang.org/issues/288 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03* error.c: [DOC] Update bug tracker url by @ScotterC [Fixes GH-390]zzak
https://github.com/ruby/ruby/pull/390 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18* error.c, object.c, ext/readline/README.ja: [DOC] $SAFE=4 is obsolete.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18* error.c, file.c, gc.c, hash.c, thread.c, variable.c, vm_eval.c, bin/erb:ktsj
$SAFE=4 is obsolete. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20error.c: evaluate RARRAY_AREF oncenobu
* error.c (rb_check_backtrace): evaluate RARRAY_AREF only once. the first argument of RB_TYPE_P is expanded twice for non-immediate types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07* internal.h (numberof): Gathered from various files.akr
* array.c, math.c, thread_pthread.c, iseq.c, enum.c, string.c, io.c, load.c, compile.c, struct.c, eval.c, gc.c, parse.y, process.c, error.c, ruby.c: Remove the definitions of numberof. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02fill rdocsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e