summaryrefslogtreecommitdiff
path: root/intern.h
AgeCommit message (Collapse)Author
2009-01-22merge revision(s) 19078,20097:shyouhei
* gc.c (rb_mark_set): new function to mark keys. * marshal.c (struct dump_arg, struct load_arg): added wrappers to mark data entries. backport from trunk r13527,r13528,r13961,r16533. [ruby-dev:36082] * marshal.c (marshal_load): arg.data is no longer a VALUE but a st_table, and freed in load_ensure. pointed out by pegacorn. [ruby-dev:37008] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15merge revision(s) 18463:shyouhei
* gc.c (STACK_LEVEL_MAX, ruby_stack_length): returns size_t. [ruby-core:18207] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-07merge revision(s) 17827,17846:17848:shyouhei
* gc.c: add rb_during_gc(). based on a patch from arton <artonx AT yahoo.co.jp> at [ruby-dev:35313]. * intern.h: ditto. * ext/win32ole/win32ole.c: avoid creating Ruby object during GC. thanks to arton <artonx AT yahoo.co.jp>. [ruby-dev:35313] * ext/win32ole/tests: add test_win32ole_event.rb, remove testOLEEVENT.rb * ext/win32ole/tests/testWIN32OLE.rb(test_convert_bignum): fix test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19* array.c (ary_new, rb_ary_initialize, rb_ary_store,shyouhei
rb_ary_aplice, rb_ary_times): integer overflows should be checked. based on patches from Drew Yao <ayao at apple.com> fixed CVE-2008-2726 * string.c (rb_str_buf_append): fixed unsafe use of alloca, which led memory corruption. based on a patch from Drew Yao <ayao at apple.com> fixed CVE-2008-2726 * sprintf.c (rb_str_format): backported from trunk. * intern.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-06Merge changes from ruby_1_8 to reduce warnings and potentially improveknu
security. * mkconfig.rb: hide build path from rbconfig.rb. * util.c (ruby_strtod, dtoa): initialize more variables for error handling. * io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique), (path2class, path2module): constified. * pack.c (pack_unpack), process.c (rb_syswait): suppress warnings. * suppress warnings on cygwin, mingw and mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-18Merge r16206 and r16239 from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-19Merge everything from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.knu
* string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-09* enumerator.c, inits.c (rb_call_inits), ruby.h, intern.h,knu
ext/enumerator, common.mk (OBJS, enumerator.$(OBJEXT)): Make the enumerator module built-in, * enumerator.c: New method: Enumerable::Enumerator#with_index. * enum.c (enum_each_with_index): Enumerable#each_with_index now returns an enumerator instead of raising an exception if no block is given. Enumerable#enum_with_index, formerly defined in the enumerator module, is kept as an alias to each_with_index for backward compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-09* eval.c (rb_obj_method, rb_proc_call), intern.h: Export.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-05* object.c (rb_check_to_integer): backported for range_step.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-27* intern.h, string.c (rb_str_set_len): added for upgrading path fromnobu
1.8 to 1.9. [ruby-dev:32807] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-20* eval.c, intern.h, ext/thread/thread.c: should not free queue whilenobu
any live threads are waiting. [ruby-dev:30653] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-22* intern.h (is_ruby_native_thread): removed since declared as an intnobu
function in ruby.h already. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-22* file.c (rb_file_s_rename): deleted code to get rid of a bug ofnobu
old Cygwin. * file.c (rb_file_truncate): added prototype of GetLastError() on cygwin. [ruby-dev:31239] * intern.h (is_ruby_native_thread): prototype. * missing/strftime.c (strftime): fix printf format and actual arguments. * ext/Win32API/Win32API.c (Win32API_initialize): ditto. * ext/tk/tcltklib.c (ip_finalize): ditto. * ext/dl/ptr.c (rb_dlptr_inspect): ditto. [ruby-dev:31268] * ext/dl/sym.c (rb_dlsym_inspect): ditto. * ext/socket/getnameinfo.c: include stdio.h always. * ext/win32ole/win32ole.c (ole_hresult2msg, folevariable_name, folevariable_ole_type, folevariable_ole_type_detail, folevariable_value, folemethod_visible): missing return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-19* bignum.c (rb_big_lshift, rb_big_rshift): separated functionsnobu
to get rid of infinite recursion. fixed calculation in edge cases. [ruby-dev:31244] * numeric.c (rb_fix_lshift, rb_fix_rshift): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-11* eval.c (error_handle): no message when exiting by signal.nobu
* eval.c (ruby_cleanup): re-send signal. [ruby-dev:30516] * eval.c (rb_thread_interrupt): instantiate SignalException. * eval.c (rb_thread_signal_raise): now takes signal number instead of signal name. * intern.h (rb_thread_signal_raise, ruby_default_signal): prototypes. * signal.c (esignal_init): takes a signal number and an optional signal name. * signal.c (interrupt_init): pass SIGINT always. * signal.c (ruby_default_signal): invoke system default signal handler. * signal.c (rb_signal_exec, trap): handle SIGTERM. [ruby-dev:30505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-15* dir.c, win32/win32.c, win32/dir.h, ruby.h, intern.h: Bringknu
encoding aware globbing support in from trunk. Dir.[] and Dir.glob() can now take many patterns in an array. Minor fixes will follow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-10* ext/strscan/strscan.c (strscan_do_scan): should set kcode option before ↵aamine
match. [ruby-dev:29914] * test/strscan/test_stringscanner.rb: test it. * re.c: export kcode_set_option and kcode_reset_option (with "rb_" prefix). * intern.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* sprintf.c (rb_str_format): should preserve leading zeromatz
information for negative %b and %x. [ruby-talk:221347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-14* string.c (rb_str_intern): raise SecurityError only when $SAFEmatz
level is greater than zero. [ruby-core:08862] * parse.y (rb_interned_p): new function to check if a string is already interned. * object.c (str_to_id): use rb_str_intern(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-16* re.c (rb_reg_initialize): should not modify untainted objects inmatz
safe levels higher than 3. * re.c (rb_memcmp): type change from char* to const void*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-25* configure.in, dln.c, file.c, intern.h, missing.h (eaccess): usenobu
system routine if provided. fixed: [ruby-core:07195] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23* intern.h, file.c: failed to compile on windows.ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-22* object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): checknobu
if valid as a symbol name more strictly. [ruby-dev:27478] * test/ruby/test_symbol.rb: tests for [ruby-core:03573]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-11* eval.c (rb_obj_respond_to): check if obj responds to the givennobu
method with the given visibility. [ruby-dev:27408] * eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-28* eval.c (ev_const_get), variable.c (rb_const_get_0): retry only whennobu
autoload succeeded. * variable.c (rb_autoload_load): now return true if autoload succeeded. fixed: [ruby-dev:27331] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-12* signal.c (sigexit): call rb_thread_signal_exit() instead ofmatz
rb_exit(). [ruby-dev:26347] * eval.c (rb_thread_signal_exit): a new function to exit on main thread. * eval.c (rb_thread_switch): exit status should be retrieved from ruby_errinfo. * eval.c (rb_f_exit): ensure exit(0) should call exit(EXIT_SUCCESS). * missing/mkdir.c: remove. [ruby-core:05177] * lib/delegate.rb (SimpleDelegator::__setobj__): need check for recursive delegation. [ruby-core:04940] * misc/ruby-mode.el (ruby-expr-beg): fix looking point drift. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-03* st.h: fix prototypes.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29* object.c (convert_type): [ruby-core:03845]matz
* eval.c (rb_funcall_rescue): new function. * object.c (rb_Array): avoid using rb_respond_to(). * object.c (rb_Integer): ditto. * eval.c (get_backtrace): no conversion for nil. * parse.y (reduce_nodes): empty body should return nil. * lib/cgi/session.rb (CGI::Session::initialize): [ruby-core:03832] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30* string.c (rb_str_locktmp): lock string temporarily.matz
* string.c (str_independent): add tmplock check. * io.c (io_write): lock output string temporarily. [ruby-dev:24649] * io.c (io_write): use rb_str_locktmp(). * io.c (read_all): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-20* string.c (str_gsub): reentrant check. [ruby-dev:24432]matz
* backport all SEGV bug fixes from CVS HEAD. [ruby-dev:24536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-18* intern.h, object.c (rb_class_inherited_p): export.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_s_sysopen): preserve path in the buffer allocated bymatz
ALLOCA_N() to prevent modification. [ruby-dev:24438] * io.c (rb_io_mode_flags): preserve append mode flag. [ruby-dev:24436] * io.c (rb_io_modenum_mode): do not use external output buffer. * string.c (rb_str_justify): differ pointer retrieval to prevent padding string modification. [ruby-dev:24434] * range.c (range_each_func): allow func to terminate loop by returning RANGE_EACH_BREAK. * range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959] * marshal.c (r_byte): retrieve pointer from string value for each time. [ruby-dev:24404] * marshal.c (r_bytes0): ditto. * enum.c (sort_by_i): re-entrance check added. [ruby-dev:24399] * io.c (io_read): should freeze all reading buffer. [ruby-dev:24400] * string.c (rb_str_sum): should use bignums when bits is greater than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395] * eval.c (specific_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24382] * eval.c (specific_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24382] * string.c (rb_str_sum): wrong cast caused wrong result. [ruby-dev:24385] * enum.c (enum_sort_by): hide temporary array from ObjectSpace.each_object. [ruby-dev:24386] * string.c (rb_str_sum): check was done with false pointer. [ruby-dev:24383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-02* string.c (rb_str_sum): check was done with false pointer.matz
[ruby-dev:24383] * string.c (rb_str_sum): string may be altered. [ruby-dev:24381] * eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24373] * io.c (io_read): block string buffer modification during rb_io_fread() by freezing it temporarily. [ruby-dev:24366] * io.c (rb_io_s_popen): mode argument may be altered. [ruby-dev:24375] * file.c (rb_file_s_basename): ext argument may be altered. [ruby-dev:24377] * enum.c (enum_sort_by): use NODE instead of 2 element arrays. [ruby-dev:24378] * string.c (rb_str_chomp_bang): StringValue() may change the receiver. [ruby-dev:24371] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-23* gc.c (define_final): should not disclose NODE* to Ruby world.matz
[ruby-dev:23957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-15* class.c, error.c, eval.c, intern.h, object.c, variable.c:ocean
do not set path if it is a singleton class. [ruby-dev:22588] (backport from 1.9) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-29* eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level.nobu
* gc.c (define_final, run_final): preserve and restore safe level for finalizers. [ruby-core:03058] * signal.c (signal_exec, rb_trap_exit, trap): preserve and restore safe level for signal handlers. [ruby-dev:23829] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-14* eval.c (eval): warning during eval should not cause deadlock.matz
[ruby-talk:98651] * eval.c (rb_eval): raise TypeError exception for superclass mismatch. [ruby-dev:39567] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-31* intern.h: provide proper prototypes. [ruby-core:02724]nobu
* ruby.h: missing.h is now prerequisite to intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21* class.c (rb_check_inheritable): new function. [ruby-dev:22316]nobu
* intern.h: add prototype. * eval.c (superclass): use rb_check_inheritable(). * object.c (rb_class_initialize): check argument validity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-15* dir.c (check_dirname): check string safety and remove extraneousnobu
trailing directory separators. [ruby-dev:22279] * file.c: extern rb_path_next, rb_path_skip_prefix, rb_path_last_separator, rb_path_end. * intern.h: prototypes for rb_path_next, rb_path_skip_prefix, rb_path_last_separator, rb_path_end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-14* intern.h (ruby_stop): never return.nobu
* ruby.h (ruby_run): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-13* eval.c (rb_feature_p): match by classified suffix.nobu
* eval.c (rb_require_safe): require library in the specified safe level. * variable.c (rb_autoload, rb_autoload_load): restore safe level when autoload was called. [ruby-dev:21338] * intern.h: prototypes; rb_require_safe. * test/runner.rb: accept non-option arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01* ext/etc/etc.c: add new functions: setpwent, getpwent, endpwent,matz
setgrent, getgrent, endgrent. * ext/socket/socket.c (sock_s_gethostbyname): do not reverse lookup. * Makefile.in: copy lex.c from $(srcdir) if it's not the current directory. [ruby-dev:21437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29* eval.c (rb_thread_atfork): wrong format specifier.matz
[ruby-dev:21428] * process.c (pst_inspect): better description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-12* intern.h (rb_disable_super, rb_enable_super): replace with dummynobu
expressions instead of prototypes. the functions remain yet for binary compatibility. [ruby-talk:81758] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e