summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-06-26object.c: common prefix of converter methodsnobu
* object.c (convert_type): check common prefix of converter method names first. shrink conv_method_names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26ChangeLog: doc accidentally squashed commit in r51036normal
Oops :x * hash.c (rb_hash_fetch_m): remove unnecessary volatile since r41597 (env_reject_bang): trade volatile for GC guard (env_select): ditto (env_select_bang): ditto (env_keep_if): ditto (rb_env_clear): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26transcode.c: fix race conditionnobu
* transcode.c (load_transcoder_entry): fix transcoder loading race condition, by waiting in require. [ruby-dev:49106] [Bug #11277] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25enum.c (enum_minmax): simplify return value creationnormal
No need to call three functions on success when one will do. This results in less LoC and smaller object code, too: text data bss dec hex filename 33860 0 296 34156 856c gcc/enum.o-before 33852 0 296 34148 8564 gcc/enum.o * enum.c (enum_minmax): simplify return value creation * test/ruby/test_enum.rb: test behavior on empty git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25Revert r51034 "st.c: use ccan linked-list"normal
Maybe this will stop mysterious CI failures from ko1@sasada-8core: リビジョン 51034 です。 make[1]: ディレクトリ `/mnt/sdb1/ruby/build' に入ります ../trunk/revision.h unchanged make[1]: ディレクトリ `/mnt/sdb1/ruby/build' から出ます make[1]: ディレクトリ `/mnt/sdb1/ruby/build' に入ります config.guess already exists config.sub already exists generating ../trunk/ext/ripper/ripper.c make[2]: ディレクトリ `/mnt/sdb1/ruby/trunk/ext/ripper' に入ります extracting ripper.y from ../../parse.y id.h not found in ["../.."] make[2]: *** [ripper.y] エラー 1 make[2]: ディレクトリ `/mnt/sdb1/ruby/trunk/ext/ripper' から出ます make[1]: *** [../trunk/ext/ripper/ripper.c] エラー 2 make[1]: ディレクトリ `/mnt/sdb1/ruby/build' から出ます make: [up] エラー 2 (無視されました) make: *** [.rbconfig.time] セグメンテーション違反です Command exited with non-zero status 2 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25st.c: use ccan linked-listnormal
This improves the bm_vm2_bighash benchmark significantly by removing branches during insert, but slows down anything requiring iteration with the more complex loop termination checking. Speedup ratio of 1.10 - 1.20 is typical for the vm2_bighash benchmark. * include/ruby/st.h (struct st_table): hide struct list_head * st.c (struct st_table_entry): adjust struct (head, tail): remove shortcut macros (st_head): new wrapper function (st_init_table_with_size): adjust to new struct and API (st_clear): ditto (add_direct): ditto (unpack_entries): ditto (rehash): ditto (st_copy): ditto (remove_entry): ditto (st_shift): ditto (st_foreach_check): ditto (st_foreach): ditto (get_keys): ditto (get_values): ditto (st_values_check): ditto (st_reverse_foreach_check): ditto (unused) (st_reverse_foreach): ditto (unused) [ruby-core:69726] [Misc #10278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25* 2015-06-26svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25* test/-ext-/popen_deadlock/test_popen_deadlock.rb: test [Bug #11265]ngoto
* ext/-test-/popen_deadlock/infinite_loop_dlsym.c: new ext to call dlsym(3) infinitely without GVL, used in the above test. * ext/-test-/popen_deadlock/extconf.rb: extconf.rb for the above ext. Currently, only enabled on Solaris (main target) and Linux (as a reference platform and for debugging the ext). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25* configure.in: not to use vfork on Solaris to avoid deadlockngoto
occurred in vfork(2) with multi-threading and dynamic linker on Solaris. [Bug #11265] [ruby-dev:49089] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25* test/lib/envutil.rb (Test::Unit::Assertions#assert_no_memory_leak):ngoto
NO_MEMORY_LEAK_ENVS is moved to Memory::NO_MEMORY_LEAK_ENVS to reduce child executions during test-all on Solaris. * test/lib/memory_status.rb (Memory::NO_MEMORY_LEAK_ENVS): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25* vm_method.c (rb_method_entry_create): need to callko1
method_definition_reset() if def is given. Actually, `me' is a new object, so we don't need to call it. It is just to make sure. * vm_method.c (method_definition_reset): remove duplicated insertion. * vm_method.c (rb_method_entry_clone): assgine dst->def here, not in method_definition_reset(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25* vm_method.c: make a rb_method_definition_t data (def) *after* makingko1
a rb_method_entry_t data (me). Normally, `me' points `def'. Some Ruby objects pointed from `def' and objects are marked by `me' (mark_method_entry() in gc.c). However, `def' is built before making a `me', then nobody can mark objects pointed from `def' before making (and pointing from) `me'. I hope this patch solve #11244. * vm_method.c: remove `rb_' prefix from some static functions. * method.h (rb_method_entry_create): constify * gc.c (mark_method_entry): add checking `def' and `def->body.iseq.iseqptr' availability because they can be NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25error.c: remove singleton methodnobu
* error.c (rb_name_err_mesg_new): remove singleton method, and unused argument. * vm_eval.c (make_no_method_exception): call rb_name_err_mesg_new directly instead of constant lookup and method invocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25random.c: refactornobu
* random.c (fill_random_bytes): separate non-raced and raced conditions, on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25test: refine assertionsnobu
* test/test_prime.rb (test_eratosthenes_works_fine_after_timeout): use assert_raise to check timeout. * test/test_securerandom.rb: check if results are hexadecimal strings, and refine failure messages. * test/test_tracer.rb (test_tracer_with_option_r_without_gems): use assert_equal to compare. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25test_prime.rb: cosmetic changesnobu
* test/test_prime.rb (test_eratosthenes_works_fine_after_timeout): use spaces instead of TABs in ruby codes. [Fix GH-944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24* gc.c (obj_info, method_type_name): show method type name in a stringko1
instead of a number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24* gc.c (obj_info): show more details for T_IMEMO/imemo_ment.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24* vm_method.c (rb_method_definition_reset): need a WB forko1
VM_METHOD_TYPE_ATTRSET. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24* gc.c (RGENGC_OBJ_INFO, obj_info): add a macro to enable/disableko1
rich obj_info() output. At the default, the value of RGENGC_OBJ_INFO is (RGENGC_DEBUG | RGENGC_CHECK_MODE). * gc.c (RGENGC_OBJ_INFO): force enable it to debug #11244. * gc.c (gc_mark_ptr): print more details with obj_info(). * gc.c (gc_mark_children): remove useless debug prints. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24* 2015-06-25svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24ext/openssl/ossl_ssl.c: raise if kwargs given in blocking modenormal
OpenSSL::SSL::SSLSocket#sysread does not accept kwargs in blocking mode, inform users if they make an error. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): do not process kwargs in blocking mode * test/openssl/test_ssl.rb: test sysread git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24vm_method.c: use the current visibilitynobu
* vm_method.c (rb_attr): simply use the current visibility, instead of tests for each visibilities. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24vm_method.c: remove redundant checknobu
* vm_method.c (rb_attr): remove redundant check. attribute names given in ruby level should be checked before calling this function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24load.c: use RB_GC_GUARDnobu
* load.c (rb_feature_provided): use RB_GC_GUARD for fullpath after last use of feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24* gc.c (gc_mark_children): add additional debug code for #11244.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24string.c (rb_str_justify): use RB_GC_GUARDnormal
See doc/extension.rdoc for justification using RB_GC_GUARD instead of volatile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24* gc.c (gc_mark_ptr): add a check code for #11244.ko1
It should be removed later. But we can remain this check because it is only a branch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24string.c: rb_fstring_cstrnobu
* string.c (rb_fstring_cstr): new function to make a fstring from a string literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24internal.h: rb_fstring_litnobu
* internal.h (rb_fstring_lit): new macro to make a fstring from a string literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24intern.h: rb_strlen_litnobu
* include/ruby/intern.h (rb_strlen_lit): new macro to get the length of a string literal, borrowed from mruby/mruby@e4afd53. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24* re.c: Update documentation for Regexp class.hsbt
[fix GH-937][ci skip] Patch by @davydovanton git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24variable.c: remove FL_ABLE check for generic ivarsnormal
Missed this in r50758. * variable.c (generic_ivar_set): remove FL_ABLE check (gen_ivar_copy): ditto [ruby-core:69715] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-23* 2015-06-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-23ext/socket/ancdata.c (bsock_recvmsg_internal): reduce stack usenormal
Using 8K stack is probably too much. As reference, ALLOCV falls back to heap allocation at a mere 1K. Since bsock_recvmsg_internal is a function which will always allocate and can trigger GC, it is in our best interest to minimize stack usage to avoid scanning 8K of stack on GC. [ruby-core:69595] [Feature #11263] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-23error.c: ArgumentError if no receivernobu
* error.c (name_err_receiver): raise ArgumentError if no receiver is available on this exception object. [Feature #10881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-23error.c: index numbersnobu
* error.c (rb_name_err_mesg_new, name_err_mesg_to_str): name magic numbers of indexes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-23dir.c (check_dirname): avoid volatile, use return valuenormal
volatile is unnecessary since we use rb_sys_fail_path nowadays and that prevents the path argument from being GC-ed. Using a return value instead of modifying the argument directly simplifies the generated code (on 32-bit x86): text data bss dec hex filename 20744 40 20 20804 5144 dir.o-orig 20720 40 20 20780 512c dir.o * dir.c (check_dirname): avoid volatile, use return value (dir_s_chroot, dir_s_mkdir, dir_s_rmdir): adjust callers git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22struct.c: cache member definition in a subclassnormal
Since getting Qnil is already error, it is safe to use rb_attr_get. * struct.c (struct_ivar_get): cache member definition in a subclass Thanks to Sokolov Yura aka funny_falcon <funny.falcon@gmail.com> in https://bugs.ruby-lang.org/issues/10585 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22* 2015-06-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22add benchmarks for struct[:name]normal
* benchmark/bm_vm2_struct_big_href_hi.rb: new benchmark * benchmark/bm_vm2_struct_big_href_lo.rb: ditto * benchmark/bm_vm2_struct_big_hset.rb: ditto * benchmark/bm_vm2_struct_small_href.rb: ditto * benchmark/bm_vm2_struct_small_hset.rb: ditto Thanks to Sokolov Yura aka funny_falcon <funny.falcon@gmail.com> in https://bugs.ruby-lang.org/issues/10585 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22fix typo aroud Bug numbering formatngoto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22* test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removedngoto
because it has been meaningless since r36385. [Bug:11288] * test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete lines related to the removed start_watchdog method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22* 2015-06-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22win32.c: use numberofnobu
* win32/win32.c (open_dir_handle): use numberof() macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-21fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-21* NEWS: mention Array#bsearch_index and Hash#fetch_values. [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e