aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* envutil.rb: assert_file and assert_file_notnobu2012-10-098-18/+33
| | | | | | | | * test/ruby/envutil.rb (assert_file, assert_file_not): more descriptive assertions for File predicates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: use rb_random_ulong_limitednobu2012-10-095-22/+41
| | | | | | | | * array.c (rb_ary_sample): use rb_random_ulong_limited, since precision of long may be larger than double. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: rb_random_ulong_limitednobu2012-10-093-0/+23
| | | | | | | | | * random.c (rb_random_ulong_limited): new function to return a random value from 0 upto limit as unsigned long, simillary to rb_genrand_ulong_limited but with arbitrary RNG object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: uid gid exec optionsnobu2012-10-094-39/+151
| | | | | | | | * process.c (rb_execarg_addopt, rb_execarg_run_options): add :uid and :gid options. [ruby-core:47414] [Feature #6975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fix typo.nobu2012-10-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (iseq_free): fix memory leak.ko12012-10-092-0/+6
| | | | | | | | rb_iseq_t::callinfo_entries should be freed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (rb_call_info_t): add new type `rb_call_inf_t'.ko12012-10-097-51/+107
| | | | | | | | | | | | | | | | This data structure contains information including inline method cache. After that, `struct iseq_inline_cache_entry' does not need to contain inline cache for method invocation. Other information will be added to this data structure. * vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size' members to `rb_iseq_t'. * insns.def, compile.c: Use CALL_INFO instead of IC. * tool/instruction.rb: support CALL_INFO as operand type. * vm_insnhelper.c, vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-09svn2012-10-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (zstream_run_func): don't call inflate() whennagachika2012-10-082-0/+16
| | | | | | | | | z->stream.avail_in == 0. it return Z_BUF_ERROR. but deflate() could be called with z->stream->avail_in == 0 because it has hidden buffer in z->stream->state (opaque structure). fix for gem install error. [ruby-dev:46149] [Bug #7040] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_refinements): new method Module#refinements.shugo2012-10-083-0/+103
| | | | | | * test/ruby/test_refinement.rb: add new tests for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,shugo2012-10-0811-71/+84
| | | | | | | | vm_method.c: rename omod and overlaid modules to refinements. * eval.c (hidden_identity_hash_new): renamed from identity_hash_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typoskazu2012-10-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-08svn2012-10-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix ML refkazu2012-10-071-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/abbrev.rb: Documentation examples for Abbrev.zzak2012-10-062-9/+43
| | | | | | | [ruby-dev:47442] [Bug #6985] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_aref):zzak2012-10-062-2/+8
| | | | | | | | Grammar in Thread documentation. Patch by Steve Klabnik [ruby-dev:47799] [Bug #7099] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_match):zzak2012-10-061-0/+6
| | | | | | | | Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-07svn2012-10-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_match):zzak2012-10-061-0/+4
| | | | | | | | Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_config.rb (OpenSSL#test_constants): skip only whennobu2012-10-061-3/+3
| | | | | | DEFAULT_CONFIG_FILE does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* reapply r37098nobu2012-10-061-2/+1
| | | | | | UTF-16 and UTF-32 are also treated as unicode since r37101. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option toshugo2012-10-063-0/+11
| | | | | | | | | enable/disable global method caching. [ruby-dev:46203] [Bug #7111] * vm_method.c (rb_method_entry_get_with_omod): don't use global method cache if OPT_GLOBAL_METHOD_CACHE is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (search_method): check omod only once for performance.shugo2012-10-062-10/+43
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r37098naruse2012-10-061-1/+2
| | | | | | | | This reverts * encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag. because UTF-16 and UTF-32 is also treated as unicode in this context. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: use markable_object_pnobu2012-10-061-2/+1
| | | | | | | * gc.c (gc_mark_children): use markable_object_p() and reduce duplicated code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_objspace.rb: refinenobu2012-10-061-5/+3
| | | | | | | * test/objspace/test_objspace.rb (test_reachable_objects_from): use proper assertions, and show messages than comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: unicode_pnobu2012-10-065-3/+24
| | | | | | | | | * enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): endian-less wide UTF encodings are dummy but Unicode. * encoding.c (rb_encdb_set_unicode): set Unicode flag. * template/encdb.h.tmpl: allow ENC_DUMMY variants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adding a test for initialize_clone and initialize_dup. From Github:tenderlove2012-10-051-0/+11
| | | | | | https://github.com/ruby/ruby/pull/190 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-06svn2012-10-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: unicode_pnobu2012-10-051-2/+1
| | | | | | * encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix commentsnari2012-10-051-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r37091nari2012-10-052-12/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * template/Doxyfile.tmpl: remove SHOW_DIRECTORIES andtakano322012-10-052-2/+6
| | | | | | | | HTML_ALIGN_MEMBERS lines. They have been obsolete in Doxygen version 1.8.2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.ko12012-10-055-31/+202
| | | | | | | | | | | | | | | | | This method returns an array of objects referenced by given object. If given object is special objects such as true/false/nil/Fixnum etc then it returns nil. See rdoc for details. [ruby-core:39772] * test/objspace/test_objspace.rb: add a test for this method. * gc.c: add rb_objspace_reachable_objects_from(). To make this function, add several member `mark_func_data' to rb_objspace_t. If mark_func_data is not null, then gc_mark() calls mark_func_data::mark_func. * gc.h: export rb_objspace_reachable_objects_from(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: gdb-rubynobu2012-10-052-2/+4
| | | | | | | | * Makefile.in (RUNRUBY_COMMAND): split from RUNRUBY. * common.mk (gdb-ruby): use runruby.rb to set up library path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix a missnari2012-10-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (chain_finalized_object): remove to check a mark flag andnari2012-10-052-7/+12
| | | | | | | | | | marking since all objects are certainly unmarked with rest_sweep. * gc.c (rb_objspace_call_finalizer): remove to mark finalizable objects. The sweeping doesn't push T_ZOMBIE objects to the freelist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-05svn2012-10-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* depend: missing dependencynobu2012-10-051-2/+3
| | | | | | * ext/date/depend: all source files need ruby.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (init_heap): call init_mark_stack before to allocatenari2012-10-042-1/+8
| | | | | | | altstack. This change avoid the stack overflow at the signal handler on 32bit, but I don't understand reason... [Feature #7095] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (getlocal, setlocal): remove old getlocal/setlocalko12012-10-046-88/+69
| | | | | | | | | | | | | instructions and rename getdaynmic/setdynamic instructions to getlocal/setlocal. * compile.c: ditto. * iseq.c: remove TS_DINDEX. * vm_exec.h (dindex_t): remove type definition of `dindex_t'. * tool/instruction.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (vm_analysis_insn|operand|register): use st_insertko12012-10-042-7/+17
| | | | | | | | | instead of using rb_hash_aset() because rb_hash_aset() check $SAFE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysisko12012-10-047-177/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hooks (old macro name is COLLECT_USAGE_ANALYSIS). This feature is only for VM developers. (I'm not sure I can use `VM developers' (the plural form) in this sentence). If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following usage collection features: (1) insntruction: collect intruction usages. (2) operand: collect operand usages. (3) register: collect register usages. The results are stored in RubyVM::USAGE_ANALYSIS_INSN for (1, 2), RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and RubyVM::USAGE_ANALYSIS_REGS for (3). You can stop collecting usages with RubyVM::USAGE_ANALYSIS_INSN_STOP(), RubyVM::USAGE_ANALYSIS_OPERAND_STOP(), RubyVM::USAGE_ANALYSIS_REGISTER_STOP() for (1), (2), (3) respectively. You can also change the hook functions by setting C level global variables `ruby_vm_collect_usage_func_(insn|operand|register)' for (1), (2), (3) respectively. See codes for more details. * tool/instruction.rb: fix macro names. * iseq.c (insn_operand_intern): make it export (used in vm.c). fix to skip several processes if not needed (pointer is 0). * vm_dump.c: move codes for collection features to vm.c. * vm_exec.h: rename macro and function names. * vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_settracefunc.rb (test_tracepoint):ko12012-10-042-53/+6
| | | | | | | | | remove unused test case. (this test case is redefined by newer tests) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objectsnari2012-10-042-3/+6
| | | | | | at suitable point. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: self-referencing finalizersnobu2012-10-042-6/+26
| | | | | | | | * gc.c (rb_objspace_call_finalizer): mark self-referencing finalizers before run finalizers, to fix SEGV from btest on 32bit. * gc.c (gc_mark_stacked_objects): extract from gc_marks(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: use enum for debugging.nobu2012-10-041-53/+55
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: precise stack sizenobu2012-10-042-2/+16
| | | | | | | | * thread_pthread.c (ruby_init_stack): round stack limit to page size boundary to calculate stack size more precisely. [ruby-dev:46174] [Bug #7084] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (RUBY_STACK_MIN_LIMIT): name magic number.nobu2012-10-041-19/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-04svn2012-10-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e