aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mkmf.rb: split --libsnobu2015-06-012-4/+17
| | | | | | | | * lib/mkmf.rb (pkg_config): split --libs if --libs-only-l option is not available. patch in [ruby-core:69428] by Hans Mackowiak. [ruby-core:69421] [Bug #11201] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_mark_children): remove a garbage characterko12015-06-012-1/+6
| | | | | | | | introduced at the last commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_method_entry_make): do not show warning messageko12015-06-013-2/+8
| | | | | | | | when method_entry is an alias. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkmf.rb: logging pkg_confignobu2015-06-011-2/+4
| | | | | | * lib/mkmf.rb (pkg_config): log executing command and its results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: move class related definitions.ko12015-06-012-41/+46
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c: remove needless include pragmra for method.h.ko12015-06-014-3/+8
| | | | | | | | | * struct.c: ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_complex.rb: Add test for CMath.log2gogotanaka2015-06-011-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enum.c: [DOC] Fix typo [ci skip][Fix GH-904]gogotanaka2015-06-011-1/+1
| | | | | | Patch provided by @jwworth git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.rb: [DOC] Fix typo [ci skip][Fix GH-907]gogotanaka2015-06-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tkutil.c: fix out-of-bounds accessnobu2015-06-011-0/+1
| | | | | | | * ext/tk/tkutil/tkutil.c (cbsubst_table_setup): check array length not access out-of-bounds. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/date/date_core.c: [DOC] fold long paragraphsnobu2015-05-311-7/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_method.c: suppress warningnobu2015-05-311-1/+1
| | | | | | | * vm_method.c (rb_frame_visibility_check): suppress comparison warning by gcc 4.8 and 4.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] Decrease heading under DateTime [ci skip]zzak2015-05-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tkutil.c: fix memory leak and segfaultnobu2015-05-311-79/+50
| | | | | | | | | | | | | | | | | | | | | | * ext/tk/tkutil/tkutil.c (cbsubst_append_inf_key): extract a function append a key in subst info to a string. make result strings first and get rid of potential memory leak. * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_arg): allocate the result buffer as a string to fix: * memory leak when the argument key is not found: loop {Tk::Event.subst_arg(:a) rescue nil} * buffer overflow segfault when many arguments: class T < TkUtil::CallbackSubst _setup_subst_table([[?a, ?A, :_a]], []) subst_arg(*[:_a]*1000).size end git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_intern.h, vm_method.c: move macros to functions.ko12015-05-314-10/+35
| | | | | | | | | | | * SCOPE_TEST(f) -> rb_frame_visibility_test(flag). * SCOPE_CHECK(f) -> rb_frame_visibility_check(flag). * SCOPE_SET(f) -> rb_frame_visibility_set(flag). * load.c (load_ext): use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c: [DOC] Add comparison of Time and DateTimezzak2015-05-312-1/+65
| | | | | | | Patch provided by @pixeltrix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (VM_FRAME_MAGIC_DUMMY): introduce new frame type toko12015-05-314-2/+12
| | | | | | | | | | recognize dummy frame. * vm.c (th_init): use new frame type. * vm_args.c (raise_argument_error): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_class_has_methods): added to reduce depenedencyko12015-05-314-2/+19
| | | | | | | | | | to internal class data structure. * internal.h: ditto. * hash.c (has_extra_methods): use added function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c , gc.h (rb_obj_info): export obj_info(VALUE) for debugging.ko12015-05-313-0/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_gc.rb: increase timeout seconds for GC stressfulko12015-05-312-1/+6
| | | | | | | | debugging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-06-01svn2015-05-311-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tkutil.c: reduce unnecessary buffernobu2015-05-311-2/+2
| | | | | | | * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_key): reduce unnecessary buffer. the result string is one byte per one word. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_tempfile.rb: use assert_predicatenobu2015-05-311-4/+4
| | | | | | | * test/test_tempfile.rb: use assert_predicate and assert_not_predicate for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_tempfile.rb: use assert_filenobu2015-05-311-5/+5
| | | | | | | * test/test_tempfile.rb: use assert_file for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indentko12015-05-301-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h: fix typo of comments.ko12015-05-302-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h: add VM_METHOD_TYPE_ALIAS rb_method_definition_t::typeko12015-05-309-53/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to fix [Bug #11173]. Now, inter class/method alias creates new method entry VM_METHOD_TYPE_ALIAS, which has an original method entry. * vm_insnhelper.c (find_defiend_class_by_owner): added. Search corresponding defined_class from owner class/module. * vm_method.c (rb_method_entry_get_without_cache): return me->klass directly for defined_class. Now, no need to check me->klass any more. * vm_method.c (method_entry_set0): separated from method_entry_set(). * vm_method.c (rb_alias): make method entry has VM_METHOD_TYPE_ALIAS. * vm_method.c (release_method_definition): support VM_METHOD_TYPE_ALIAS. * vm_method.c (rb_hash_method_definition): ditto. * vm_method.c (rb_method_definition_eq): ditto. * vm_method.c (release_method_definition): ditto. * vm_insnhelper.c (vm_call_method): ditto. * vm_insnhelper.c (vm_method_cfunc_entry): ditto. * vm_eval.c (vm_call0_body): ditto. * gc.c (mark_method_entry): ditto. * proc.c (method_def_iseq): ditto. * proc.c (method_cref): ditto. * proc.c (rb_method_entry_min_max_arity): ditto. * test/ruby/test_alias.rb: add tests. * test/ruby/test_module.rb: fix a test to catch up current behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_unlink_method_entry): make it static.ko12015-05-302-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix ChangeLog message.ko12015-05-301-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-31svn2015-05-301-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h, vm_method.c (rb_free_method_entry): constify a parameter.ko12015-05-304-4/+11
| | | | | | | | | * vm_method.c (rb_unlink_method_entry): constify a parameter. * vm_core.h: remove useless declaration about rb_unlink_method_entry(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb (Remover#call): fixed wrong condition introduced atusa2015-05-303-2/+7
| | | | | | | r50682. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/ancdata.c: use RB_GC_GUARD instead of volatilenormal2015-05-302-1/+9
| | | | | | | | See doc/extension.rdoc for explanation. [ruby-core:69419] [Feature #11198] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb (Tempfile#initialize): initialize @unlinked to fixusa2015-05-302-0/+7
| | | | | | | | test failures introduced at r50682. I hope that check the results of tests before committing, at least the tests about the changed feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* change lingering dtrace probe documentation from function- to method-tenderlove2015-05-303-8/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb: refactoring.glass2015-05-302-55/+38
| | | | | | | | | | * use warn instead of STDERR.print * remove @tmpname and use @tmpfile.path * introduce @unlinked flag * Remover takes only @tmpfile * mode will be modified just before file reopen git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2015-05-300-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: avoid compatibility table with generic ivarsnormal2015-05-308-23/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This recovers and improves performance of Marshal.dump/load on Time objects compared to when we implemented generic ivars entirely using st_table. This also recovers some performance on other generic ivar objects, but does not bring bring Marshal.dump/load performance up to previous speeds. benchmark results: minimum results in each 10 measurements. Execution time (sec) name trunk geniv after marshal_dump_flo 0.343 0.334 0.335 marshal_dump_load_geniv 0.487 0.527 0.495 marshal_dump_load_time 1.262 1.401 1.257 Speedup ratio: compare with the result of `trunk' (greater is better) name geniv after marshal_dump_flo 1.026 1.023 marshal_dump_load_geniv 0.925 0.985 marshal_dump_load_time 0.901 1.004 * include/ruby/intern.h (rb_generic_ivar_table): deprecate * internal.h (rb_attr_delete): declare * marshal.c (has_ivars): use rb_ivar_foreach (w_ivar): ditto (w_object): update for new interface * time.c (time_mload): use rb_attr_delete * variable.c (generic_ivar_delete): implement (rb_ivar_delete): ditto (rb_attr_delete): ditto [ruby-core:69323] [Feature #11170] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Check ruby_current_threadnobu2015-05-302-4/+8
| | | | | | | * cont.c (cont_free): check if ruby_current_thread is still valid. [Fix GH-914] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: use indices for generic ivarsnormal2015-05-292-125/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces memory overhead of ivars for common types such as T_DATA the same way T_OBJECT does it. For 9992 accepted clients on an OpenSSL server, this reduces memory from 77160K to 69248K with the script in https://bugs.ruby-lang.org/issues/11170 * variable.c (static int special_generic_ivar): move (rb_generic_ivar_table): rewrite for compatibility (gen_ivtbl_bytes): new function (generic_ivar_get): update to use ivar index (generic_ivar_update): ditto (generic_ivar_set): ditto (generic_ivar_defined): ditto (generic_ivar_remove): ditto (rb_mark_generic_ivar): ditto (givar_i): ditto (rb_free_generic_ivar): ditto (rb_mark_generic_ivar_tbl): ditto (rb_generic_ivar_memsize): ditto (rb_copy_generic_ivar): ditto (rb_ivar_set): ditto (rb_ivar_foreach): ditto (rb_ivar_count): ditto (givar_mark_i): remove (gen_ivtbl_mark): new function (gen_ivar_each): ditto (iv_index_tbl_extend): update for struct ivar_update (iv_index_tbl_newsize): ditto [ruby-core:69323] [Feature #11170] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-30svn2015-05-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: extract common functions for generic ivar indicesnormal2015-05-292-20/+51
| | | | | | | | | | * variable.c (iv_index_tbl_make): extract from rb_ivar_set (iv_index_tbl_extend): ditto (iv_index_tbl_newsize): ditto (rb_ivar_set): use extracted functions [ruby-core:69323] (Part 1) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2015-05-290-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/make_hgraph.rb: added.ko12015-05-292-0/+99
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: wrapper object before allocnobu2015-05-2923-124/+226
| | | | | | | * ext/openssl: make wrapper objects before allocating structs to get rid of potential memory leaks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* psych: allocate structs with wrappernobu2015-05-292-5/+4
| | | | | | | | | * ext/psych/psych_emitter.c (allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. * ext/psych/psych_parser.c (allocate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: check NTH_REF rangenobu2015-05-296-14/+57
| | | | | | | | | | * compile.c (iseq_compile_each): out of range NTH_REF is always nil. * parse.y (parse_numvar): check overflow of NTH_REF and range. [ruby-core:69393] [Bug #11192] * util.c (ruby_scan_digits): make public and add length parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket: avoid redundant fcntl on Linuxnormal2015-05-294-3/+26
| | | | | | | | | | | | | | | | | | | | * ext/socket/ancdata.c (bsock_sendmsg_internal, bsock_recvmsg_internal): avoid redundant fcntl on Linux [ruby-core:69154] [Feature #11145] * ext/socket/init.c (rsock_s_recvfrom_nonblock): ditto * ext/socket/rubysocket.h (MSG_DONTWAIT_RELIABLE): new macro MSG_DONTWAIT is enough to force non-blocking I/O under Linux, so avoid changing the state of a socket. This will allow certain threads to do a non-destructive non-blocking "peek" while others block (without relying on an extra ppoll syscall). We shall be conservative about enabling this feature since some OSes may have incomplete support for MSG_DONTWAIT. I shall defer to a FreeBSD expert to enable that for FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: add missing reference [ci skip]normal2015-05-291-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/*: use monotonic clock for timeoutsnormal2015-05-293-5/+10
| | | | | | | | | | The monotonic clock is preferred as it is guaranteed to be continuous and not subject to jumps due to adjustments. * lib/net/resolv.rb (request): use monotonic clock * lib/net/http.rb (begin_transport, end_transport): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e