summaryrefslogtreecommitdiff
path: root/include/ruby
AgeCommit message (Collapse)Author
2008-07-31* include/ruby/ruby.h (struct RString): size of ary must bemame
RSTRING_EMBED_LEN_MAX + 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-27* include/ruby/ruby.h: add a type T_DEFERRED.ko1
* gc.c: fix deferred finalizer system. finalize processes of T_DATA and T_FILE are executed after gc process. And fix to use BUILTIN_TYPE() instead of seeing flag. * thread.c, vm_core.h: add RUBY_VM_SET_FINALIZER_INTERRUPT() and check intterupt_flag at rb_thread_execute_interrupts(). * thread.c (mutex_mark): fix to mark next_mutex. * vm.c (rb_thread_mark): fix to mark keeping_mutexes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22* include/ruby/intern.h, sprintf.c (rb_str_catf, rb_str_vcatf): newnobu
functions. [ruby-dev:35597] * string.c (rb_str_capacity): new function to return the capacity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-21* include/ruby/intern.h (rb_str_buf_new2): optimization for literals.nobu
* string.c (str_buf_cat): returns VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-21* include/ruby/intern.h (rb_str_buf_cat2, rb_str_cat2): optimizationnobu
for literals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-12 * include/ruby/ruby.h (PRI_PTRDIFF_PREFIX, PRI_SIZE_PREFIX): typo.usa
* {bcc32,win32}/Makefile.sub: (SIZEOF_SIZE_T, SIZEOF_PTRDIFF_T): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-12* include/ruby/ruby.h (PRI_PTRDIFF_PREFIX, PRI_SIZE_PREFIX): fixed typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-12* include/ruby/intern.h (HAVE_RUBY_RUBY_H): defines macros so thatnobu
extconf.rb do not need to check if headers exist under separated directory. [ruby-dev:35437] * include/{ruby,rubyio,rubysig}.h, include/ruby/intern.h: use "ruby/..." instead of <ruby/...>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-12* configure.in (sizeof ptrdiff_t): check for size of ptrdiff_t.nobu
* include/ruby/ruby.h (PRI?PTRDIFF, PRI?SIZE): printf conversion specifiers for ptrdiff_t and size_t/ssize_t. * insns.def (leave), marshal.c (long_toobig), transcode.c (str_transcode), vm_dump.c (control_frame_dump, stack_dump_each), (debug_print_register, debug_print_pre): t and z length modifiers are C99. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-10 * include/ruby/win32.h (pipe): prohibit inheritance.usa
fixed: [ruby-dev:35421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-08 * dir.c: shoudn't use ruby object in globbing, because glob serviceusa
routines are called before initializing ruby on some platforms (ex. windows). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-07* dir.c: preserve encoding of strings in glob and fnmatch.naruse
* include/ruby/ruby.h: related changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-05* include/ruby/ruby.h (NUM2INT): cast to int.akr
(FIX2INT): ditto. (NUM2UINT): cast to unsigned int. (FIX2UINT): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-05rename rb_pipe_internal to rb_pipe.akr
use rb_pipe in pipe_nocrash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-04* include/ruby/oniguruma.h (OnigEncoding): removed auxiliary_data.nobu
* include/ruby/encoding.h (ENC_DUMMY_P): moved dummy encoding flag to rb_encoding from Encoding instance. * encoding.c (rb_encoding_list): list of Encoding instances. * encoding.c (struct rb_encoding_entry): moved base encoding from instance variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* include/ruby/intern.h: remove prototypes about coverage.mame
* iseq.c (prepare_iseq_build): add prototype. * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * thread.c (update_coverage): use rb_sourceline. * thread.c (rb_get_coverages): rename and move to vm.c. * vm.c (rb_vm_get_coverages): ditto. * ext/coverage/coverage.c: add rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* ext/coverage/coverage.c, ext/coverage/extconf.rb: eliminatemame
COVERAGE__ and introduce coverage.so instead. How to measure coverage: (1) require "coverage.so", (2) require or load Ruby source file, and (3) Coverage.result will return the same hash as COVERAGE__. [ruby-dev:35324] * thread.c (rb_enable_coverages): start coverage measurement by using rb_add_event_hook. * thread.c (rb_get_coverages): returns current results of coverage measurement. * include/ruby/intern.h: add prototype for above two functions. * vm_core.h, vm.c: add field of coverages to rb_vm_t. * insns.def (trace): remove special handling for COVERAGE__. * iseq.c (prepare_iseq_build): switch COVERAGE__ to rb_get_coverages(). * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * lib/coverage.rb: use coverage.so instead of COVERAGE__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-02* gc.c: add rb_during_gc(). based on a patch from arton <artonx ATsuke
yahoo.co.jp> at [ruby-dev:35313]. * include/ruby/intern.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* compile.h, insns.def: reduce insn operand of "trace".ko1
* include/ruby/ruby.h: add RUBY_EVENT_COVERAGE event. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 * include/ruby/ruby.h (enum ruby_special_consts): ISO C forbidsshyouhei
comma at end of enumerator list * include/ruby/ruby.h (enum ruby_value_type): ditto. * eval_intern.h (enum): ditto. * vm_core.h (enum rb_thread_status): ditto. * parse.y (enum lex_state_e): ditto. * parse.y (enum string_type): ditto. * process.c (enum): ditto. * ruby.c (enum dump_flag_bits): ditto. * ruby.c (enum disable_flag_bits): ditto. * compile.c (iseq_link_element): ditto * debug.c (union): ditto. * cont.c (enum context_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* regexec.c (stack_double): use MatchStackLimitSize atomically.nobu
* regparse.c (onig_free_shared_cclass_table): OnigTypeCClassTable needs atomicity * regsyntax.c: constified all predefined OnigSyntaxTypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 * include/ruby/st.h (struct st_table): type of bit-fieldshyouhei
'num_entries' is a GCC extension git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 * include/ruby/ruby.h (rb_intern): prefix __extnsion__ forshyouhei
braced-groups within expressions. * include/ruby/intern.h (rb_usascii_str_new2): ditto. * include/ruby/intern.h (rb_tainted_str_new2): ditto. * include/ruby/intern.h (rb_str_new2): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29* encoding.c (rb_utf8_encindex): defined.naruse
* include/ruby/encoding.h (rb_utf8_encindex): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29* vm.c, vm_core.h,vm_core.h, vm_dump.c, iseq.c: rename class nameko1
VM -> RubyVM, and rename rb_cVM -> rb_cRubyVM. "VM" is too short name for class. * test/ruby/test_method.rb, test/ruby/test_settracefunc.rb: ditto. * include/ruby/ruby.h: rb_cRubyVM, rb_cEnv, rb_cISeq should not be exposed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28* include/ruby/ruby.h (struct RRegexp): new field usecnt. replaceakr
str and len by src. * gc.c (gc_mark_children): mark src field of regexp. (obj_free): don't free str field. * re.c (REG_BUSY): removed. (rb_reg_initialize): prohibit re-initialize regexp. (rb_reg_search): use usecnt to prevent freeing regexp currently using. this prevents SEGV by: r = /\A((a.)*(a.)*)*b/ r =~ "ab" + "\xc2\xa1".force_encoding("euc-jp") t = Thread.new { r =~ "ab"*8 + "\xc2\xa1".force_encoding("utf-8")} sleep 0.2 r =~ "ab"*8 + "\xc2\xa1".force_encoding("euc-jp") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28* include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2,nobu
rb_usascii_str_new2): use inline versions only for constant literals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28* include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2,nobu
rb_usascii_str_new2): use inline versions for gcc 4 or lator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27* include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2,nobu
rb_usascii_str_new2): use with-length versions with strlen to optimize strlen, if optimized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27* include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2,nobu
rb_usascii_str_new2): use with-length versions with strlen to optimize strlen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-24 * include/ruby/win32.h, win32/win32.c (rb_w32_getppid): now supportusa
getppid() on win32 (but only Win2k or later). * process.c (get_ppid): remove win32 special logic. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-20* string.c (rb_memhash): randomize hash to avoid algorithmicakr
complexity attacks. (rb_str_hash): use rb_memhash. * include/ruby/intern.h (rb_reset_random_seed): declared. * thread.c (rb_thread_atfork): call rb_reset_random_seed. * inits.c (rb_call_inits): call Init_RandomSeed at first. * random.c (seed_initialized): defined. (fill_random_seed): extracted from random_seed. (make_seed_value): extracted from random_seed. (rb_f_rand): initialize random seed at first. (initial_seed): defined. (Init_RandomSeed): defined. (Init_RandomSeed2): defined. (rb_reset_random_seed): defined. (Init_Random): call Init_RandomSeed2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-18 * include/ruby/win32.h (pipe): now pipe is textmode. although thisusa
change is experimental, it will be spec if no compatiblity problem is reported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-17 * include/ruby/win32.h (pipe): expand pipe buffer size.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-16* encoding.c (rb_filesystem_encoding): defined.naruse
* include/ruby/encoding.h (rb_filesystem_encoding): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-13 * complex.c (string_to_c, nucomp_s_convert): preserve the currenttadf
backref. * rational.c (string_to_r, nurat_s_convert): ditto. * include/ruby/intern.h (rb_match_busy): added a declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-12* include/ruby/ruby.h (rb_intern): use rb_intern2 with strlen forakr
constant symbols to optimize strlen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10* include/ruby/intern.h, proc.c: revert rb_proc_call() andko1
create rb_proc_call_with_block() instaed. * include/ruby/ruby.h, eval_jump.c, thread.c, vm_insnhelper.c: rb_blockptr should not be exposed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10* include/ruby/intern.h (rb_obj_instance_exec, rb_mod_module_exec):nobu
added prototypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10* include/ruby/ruby.h (CONST_ID_CACHE): fixed statement expression.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10* include/ruby/encoding.h: not to use varargs.h since requiring C89.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h, vm_core.h: add a type rb_blockptr.mame
* vm_insnhelper.c (vm_yield_with_cfunc): vm_yield_with_cfunc receives blockptr and passes it to iterating block. * proc.c (rb_proc_call), include/ruby/intern.h: rb_proc_call receives blockptr. "rb_proc_call(self, args, blockptr)" in C corresponds to "self.call(*args, &block)" in Ruby. * proc.c (proc_call): pass blockptr to block that is written in C. * proc.c (curry): receive blockptr and pass it to original proc. [ruby-core:15551] * vm.c (invoke_block_from_c): fix for change of vm_yield_with_cfunc. * thread.c (call_trace_proc), eval_jump.c (rb_call_end_proc): fix for change of rb_proc_call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17065 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-06-09* vm_core.h (struct rb_vm_struct): moved ruby_debug, ruby_verbose, andnobu
rb_progname. * ruby.c (rb_argv0): no longer used. * vm.c: getters/setters for ruby_{debug,verbose}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/intern.h (Init_stack): make to call ruby_init_stack.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-06 * include/ruby/win32.h: include ws2tcpip.h. fixed [ruby-Bugs-20528]usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01* suppress warnings on cygwin, mingw and mswin.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* suppress warnings with -Wwrite-string.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* include/ruby/mvm.h: new header file for MVM, and moved rb_vm_t andnobu
rb_thread_t from vm_core.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* include/ruby/ruby.h: renamed include guard.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e