summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-06-30* win32/file.c (rb_freopen): need to terminate by NUL.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30io.c: reopen OS encoding pathnobu
* io.c (rb_io_reopen): freopen(3) with OS encoding path. [ruby-core:69780] [Bug #11320] * win32/file.c (rb_freopen): wrapper of wchar version freopen(3). use _wfreopen_s() if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30test_io.rb: skip method definitionsnobu
* test/ruby/{test_io,test_io_m17n}.rb: skip method definitions on unsupported platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29io.c: reopen stdio streams correctly when given "w+"normal
* io.c (rb_io_oflags_modestr): handle O_TRUNC correctly * test/ruby/test_io.rb (test_reopen_stdio): new test Patch-by: cremno phobia <cremno@mail.ru> [ruby-core:69779] [Bug #11319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29* 2015-06-30svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29st.c: use ccan linked-list (try 3)normal
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. v3 - st_head calculates list_head address in two steps to avoid a bug in old gcc 4.4 (Debian 4.4.7-2) bug which incorrectly warned with: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules * 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@51064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29fix previous commit for nil casenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29insns.def: no quotingnobu
* insns.def (defineclass): do not quote unprintable characters at raising an exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29* lib/net/http/response.rb (inflater): CONTENT_ENCODING can be uppernaruse
case. [ruby-core:69670] [Bug #11285] patched by Andy Chu git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29* eval.c (add_activated_refinement): should not include the originalshugo
class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29mkmf.rb: suppress warningsnobu
* lib/mkmf.rb (check_sizeof, what_type): remove static qualifiers to suppress unneeded-internal-declaration warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29* README.md: tweak styles. [fix GH-945][ci skip] Patch by @bryndymenthsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28sizes.c.tmpl: extract RUBY_DEFINTnobu
* template/sizes.c.tmpl: extract RUBY_DEFINT to define sizes of types checked by configure.in, and fix size of intptr_t in universal binary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28insns.def: preserve encodingnobu
* insns.def (defineclass): preserve encoding of name in error messages for super class mismatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28insns.def: preserve encodingnobu
* insns.def (defineclass): preserve encoding of name in error messages for non-class super. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28insns.def: preserve encodingnobu
* insns.def (defineclass): preserve encoding of name in error messages when already defined but type mismatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28* 2015-06-29svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28test_redefinition_mismatchnobu
* test/ruby/test_{class,module}.rb (test_redefinition_mismatch): add tests of redefinition mismatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28class.c: preserve encodingnobu
* class.c (rb_check_inheritable): preserve encoding in an error message when the superclass is not a class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28* 2015-06-28svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-28class.c: TypeError when superclass mismatchnobu
* class.c (rb_define_class_id_under): raise TypeError exception same as ruby level class definition when superclass mismatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-27* lib/net/ftp.rb (makeport): close the TCPServereregon
when sending the port fails. * test/net/ftp/test_ftp.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26Revert "st.c: use ccan linked-list (try 2)"normal
This reverts commit r51044 Still getting failure notices from ko1's CI machine. ref: g3qkqn git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26st.c: use ccan linked-list (try 2)normal
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@51044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26common.mk: add ccan/list headers as deps for st.cnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26* 2015-06-27svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26st.c: include ccan/list/list.h to test buildnormal
I suspect the build failures with r51034 ("st.c: use ccan linked-list") on ko1's CI machine was due to me forgetting to update common.mk :x Lets see what happens when I only include ccan/list/list.h Will followup with appropriate reverts or reinstating the rest of r51034 along with a common.mk update as I watch CI build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26sprintf.c: rb_inspect returns a stringnobu
* sprintf.c (rb_str_format): rb_inspect() always returns a string. rb_obj_as_string() has no more effect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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