summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
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
2008-05-22* eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h,ko1
vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 * eval_intern.h, vm_core.h, include/ruby/intern.h, include/ruby/ruby.h,usa
vm.c: need to add const to prototypes, of course. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20* encoding.c, include/ruby/encoding.hnaruse
(rb_enc_associate, rb_enc_associate_index): returns obj. [ruby-dev:34778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20* encoding.c (rb_ascii8bit_encoding): use ENCINDEX_ASCII.naruse
* encoding.c, include/ruby/encoding.h (rb_ascii8bit_encindex): added. * encoding.c (rb_locale_encoding): use rb_usascii_encoding(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20* transcode.c, include/ruby/encodng.h (rb_str_transcode):naruse
C API of encoding conversion for Ruby object. VALUE rb_str_transcode(VALUE str, VALUE to). * transcode.c (str_encode, str_encode_bang): rename from rb_tr_transcode or rb_str_transcode_bang. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20* include/ruby/ruby.h (PRI[diouxX]VALUE): printf format for VALUE.nobu
* gc.c (assign_heap_slot): suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* regparse.c (PINC): use optimized enclen() instead ofmatz
ONIGENC_MBC_ENC_LEN(). * regparse.c (PFETCH): ditto. * regparse.c (PFETCH): small optimization. * regexec.c (slow_search): single byte encoding optimization. * regenc.h (enclen): avoid calling function when encoding's min_len == max_len. * re.c (rb_reg_regsub): rb_enc_ascget() optimization for single byte encoding. * re.c (rb_reg_search): avoid allocating new re_registers if we already have MatchData. * re.c (match_init_copy): avoid unnecessary onig_region_free() before onig_region_copy. * encoding.c (rb_enc_get_index): remove implicit enc_capable check each time. * encoding.c (rb_enc_set_index): ditto. * encoding.c (enc_compatible_p): small refactoring. * include/ruby/encoding.h (rb_enc_dummy_p): inline rb_enc_dummy_p() and export related code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling.ko1
VM value stack frame of block contains cref information. (dfp[-1] points CREF) * compile.c, eval_intern.h, eval_method.c, load.c, proc.c, vm_dump.h, vm_core.h: ditto. * include/ruby/ruby.h, gc.c: remove T_VALUES because of above changes. * bootstraptest/test_eval.rb, test_knownbug.rb: move solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15* file.c (file_expand_path): support for alternative data streamnobu
and ignored trailing garbages of NTFS. * file.c (rb_file_s_basename): ditto. * file.c (rb_file_s_extname): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12 * process.c, include/ruby/intern.h (rb_run_exec_options): externed.usa
* process.c (save_redirect_fd, save_env_i, save_env, run_exec_dup2, run_exec_open, run_exec_pgroup, run_exec_rlimit, rb_run_exec_options): save parent's process environments. !!!remark!!! these are not thread-safe. * process.c (rb_spawn_internal): remove calling run_exec_options() because cannot restore after spawn. we'll fix this later. * io.c (pipe_open): ditto. * test/ruby/test_process.rb (test_execopts_env): upcase environment variable name for case insensitive platforms. * win32/win32.c (init_env): set USER environment variable only when USERNAME is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12* bignum.c (bigzero_p): check from MSB to LSB. [ruby-dev:34649]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-11* include/ruby/ruby.h (SIZET2NUM): new macro.akr
(NUM2SIZET): new macro. * gc.c (struct rb_objspace): use size_t for increment, length and used for 64bit. (allocate_heaps): ditto. (assign_heap_slot): ditto. (set_heaps_increment): ditto. (gc_mark_all): ditto. (is_pointer_to_heap): ditto. (free_unused_heaps): ditto. (gc_sweep): ditto. (os_obj_of): ditto. (rb_gc_call_finalizer_at_exit): ditto. (count_objects): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-11* thread.c (thread_cleanup_func_before_exec): extracted fromakr
thread_cleanup_func not to touch pthread data. pthread_cond_destroy in forked process may cause deadlock on Debian GNU/Linux Etch on x86, x86-64 and IA64. this doesn't cause resource leak because the process will exec soon. (terminate_atfork_before_exec_i): defined. (rb_thread_atfork_before_exec): defined. * include/ruby/intern.h (rb_thread_atfork_before_exec): declared. * process.c (rb_exec_atfork): call rb_thread_atfork_before_exec instead of rb_thread_atfork. * io.c (popen_exec): call rb_thread_atfork_before_exec instead of rb_thread_atfork. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30* process.c (check_exec_redirect_fd): prohibit duplex IO.akr
(check_exec_fds): record maxhint even if close_others is not specified. (rb_exec_arg_fixup): renamed from rb_exec_arg_fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-28* include/ruby/ruby.h (POSFIXABLE): use FIXNUM_MAX+1 instead ofakr
FIXNUM_MAX to make it possible to convert to double accurately. It assumes FLT_RADIX is 2. fix RubyForge bug #14102. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-28* include/ruby/intern.h (rb_exec_arg_init): declared.akr
(rb_exec_arg_addopt): delared. (rb_exec_arg_fix): declared. (rb_exec_initarg): removed. (rb_exec_getargs): removed. (rb_exec_initarg2): removed. * io.c (struct popen_arg): make execarg as a pointer. (popen_exec): follow popen_arg change. (pipe_open): add eargp argument. extract argc and argv from eargp. use rb_exec_arg_addopt to add redirect options. (pipe_open_v): set up struct rb_exec_arg. (pipe_open_s): set up struct rb_exec_arg. * process.c (rb_exec_arg_addopt): new function extracted from check_exec_options_i. (check_exec_options_i): use rb_exec_arg_addopt. (rb_check_exec_options): opthash is always a hash now. (rb_exec_getargs): make it static. (rb_exec_fillarg): renamed from rb_exec_initarg2. don't set up redirect_fds. (rb_exec_arg_init): new function. (rb_exec_arg_fix): new function. (rb_f_exec): use rb_exec_arg_init and rb_exec_arg_fix. use rb_exec_arg_addopt to set close_others option. (run_exec_options): make close_others by default. (rb_spawn_internal): use rb_exec_arg_init and rb_exec_arg_fix. use rb_exec_arg_addopt to set close_others option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* include/ruby/intern.h (rb_hash_dup): declared.akr
* hash.c (rb_hash_dup): new function. * process.c (rb_spawn_internal): don't modify option hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* io.c, signal.c, thread.c, thread_win32.c, include/ruby/intern.h:nobu
suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* include/ruby/ruby.h, gc.c: remove T_BLOCK.ko1
* include/ruby/ruby.h: re-number T_xxx. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e