summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-06IO#close: do not enqueue redundant interrupts (take #2)normal
Enqueuing multiple errors for one event causes spurious errors down the line, as reported by Nikolay Vashchenko in https://bugs.ruby-lang.org/issues/13632 This should fix bad interactions with test_race_gets_and_close in test/ruby/test_io.rb since we ensure rb_notify_fd_close continues returning the busy flag after enqueuing the interrupt. Backporting changes to 2.4 and earlier releases will be more challenging... * thread.c (rb_notify_fd_close): do not enqueue multiple interrupts [ruby-core:81581] [Bug #13632] * test/ruby/test_io.rb (test_single_exception_on_close): new test based on script from Nikolay git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-06debug.c: fix breaking condtionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-06add test_ill_formed_utf_8_replace to test recommended number of \uFFFDduerst
Add test method test_ill_formed_utf_8_replace to test/ruby/test_transcode.rb to check for the recommended number of \uFFFD replacement characters. This is the first part, using ill-formed prefixes, with suffixes up to the length of the original UTF-8 structure (including overlongs and the full 31-bit space.) For more details, see Unicode 9.0.0, Section 3.9, Best Practices for Using U+FFFD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-06re-revert r59020ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-06revert r59023 because it contans unrelated developping codeko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-06revert r59020 because it may fail some tests sometimes on some environment ↵ko1
(http://ci.rvm.jp/). This revert is to check the reason of failures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-06debug.c: parse locale and filesystem codepagesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-06* 2017-06-06svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-06IO#close: do not enqueue redundant interruptsnormal
Enqueuing multiple errors for one event causes spurious errors down the line, as reported by Nikolay Vashchenko in https://bugs.ruby-lang.org/issues/13632 * thread.c (rb_notify_fd_close): do not enqueue multiple interrupts [ruby-core:81581] [Bug #13632] * test/ruby/test_io.rb (test_single_exception_on_close): new test based on script from Nikolay git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-05win32.c: no localenobu
* win32/win32.c (skipspace, w32_cmdvector): get rid of iswspace(), which is locale dependent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-05revert r59017 it fails ruby/test_lambda.rbko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-05do not inform ``is_lambda".ko1
* vm_eval.c (yield_under): do not inform Proc is lambda or not. After that invoke_block_from_c_bh() checks it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-05rename functions and clean parameters.ko1
* internal.h (rb_yield_lambda): rename to rb_yield_force_blockarg() because this function prohibt lambda arg setup (strict setup). * vm.c (invoke_iseq_block_from_c): remove splattable argument because it is not used. * vm.c (invoke_block_from_c_splattable): rename to invoke_block_from_c_bh() because `splattable` doesn't make sense on current this function. Also accept `force_blockarg' parameter instead of `splattable` parameter. It is more clear. * vm.c (invoke_block_from_c_unsplattable): rename to invoke_block_from_c_proc() and accept `proc` instead of `block'. This function is used only by proc block invocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-05* 2017-06-05svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-05remove arg_setup_lambda.ko1
* vm_args.c (enum arg_setup_type): remove arg_setup_lambda because it is same as arg_setup_method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-04load.c: encode to OS path outside PUSH_TAGnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-04test_require.rb: fix expected pathnobu
* test/ruby/test_require.rb (test_require_with_unc): remove extra slash. the result of File.expand_path has a slash just follows the drive letter. https://github.com/ruby/ruby/commit/4ef849bd9014746821402e21053a53ea61b3690d#commitcomment-22391133 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03array.c: docs for Array#{sort,sort!}stomar
* array.c: [DOC] make example in the docs for Array#{sort,sort!} match the call-seq and description by using the same block vars. Based on a patch by Roque Pinel (repinel). [Fix GH-1628] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03* 2017-06-04svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03test_require.rb: ignore EPERM at UNCnobu
* test/ruby/test_require.rb (test_require_with_unc): ignore EPERM. GetFileAttributes and CreateFile with backup semantics fail at a symlink in a shared folder to another shared folder. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03file.c: preserve encodingnobu
* file.c (path_check_0): preserve encoding of path name in warning message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03ruby.c: dladdr_path is not used on cygwinnobu
* ruby.c (dladdr_path): dladdr is provided on recent cygwin, but GetModuleFileNameW is used instead of it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03* vm_core.h: remove VM_FRAME_MAGIC_LAMBDA and introduceko1
VM_FRAME_FLAG_LAMBDA. So that lambda block frame is VM_FRAME_MAGIC_BLOCK | VM_FRAME_FLAG_LAMBDA. * vm_core.h: remvoe VM_FRAME_MAGIC_PROC because nobody uses it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03test/ruby/test_require.rb: remove duplicate assertionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03test_require.rb: untouch default internal encodingnobu
* test/ruby/test_require.rb (assert_require_insecure_path): get rid of setting Encoding.default_internal, which affects load path conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03test: attempt to reduce failures in assert_cpu_usage_lownormal
Try to make this test less fragile by taking into account the worst case kernel timing resolution. [ruby-core:81540] * test/lib/test/unit/assertions.rb (assert_cpu_usage_low): clamp measurement to minimum measurable time and warn about tests being too short to measure * test/ruby/test_io.rb (test_copy_stream_no_busy_wait): remove pct kwarg and rely on assert_cpu_usage_low defaults git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-02string.c: docs for String#splitstomar
* string.c: [DOC] clarify docs for String#split when called with limit and capture groups. Reported by Cichol Tsai. [ruby-core:81505] [Bug #13621] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-02* 2017-06-03svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-02common.mk: show localenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-02test_require.rb: assert_require_insecure_pathnobu
* test/ruby/test_require.rb (assert_require_insecure_path): more tests for loading insecure path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-02test_require.rb: fallback encodingnobu
* test/ruby/test_require.rb (assert_require_nonascii_path): fallback when LANG=C. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-02test_require.rb: filesystem encodingnobu
* test/ruby/test_require.rb (assert_require_nonascii_path): the path in error message is converted to filesystem encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-02file.c: preserve encodingnobu
* file.c (rb_find_file_safe): preserve encoding of path in SecurityError messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01Fix DRb.start_service to use any available porteregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01Remove bad spec which cannot behave nicely in a multi-process environmenteregon
* A system port might be taken by another process at any time. * There are no useful expectations in this spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01Remove empty files in drb specseregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01Create the file in the File::TMPFILE spec in its own directoryeregon
* Avoids failing the spec if rubyspec_temp is not empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01Open files in binary modes for copying in MSpec's #cperegon
* See https://bugs.ruby-lang.org/issues/13570. * Found by MSP-Greg (Greg L). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01make Dir object WB protected.ko1
* dir.c (dir_data_type): set RUBY_TYPED_WB_PROTECTED. Insert WBs for dir_data::path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01* 2017-06-02svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01make Binding object WB protected.ko1
* proc.c (ruby_binding_data_type): set RUBY_TYPED_WB_PROTECTED. Insert write barriers (WBs) to all of writes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01load.c: convert by rb_get_path_checknobu
* load.c (rb_require_internal): convert to path name with the given safe level, without setting global safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01file.c: rb_check_funcall_default for fallback valuenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01vm_eval.c: fix rb_check_funcall_defaultnobu
* vm_eval.c (check_funcall_missing): revert r58984. should call method_missing if respond_to_missing is not redefined. * vm_eval.c (rb_check_funcall_default): return the default value if respond_to_missing and method_missing are not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01vm_eval.c: fix for rb_check_funcall_defaultnobu
* vm_eval.c (check_funcall_missing): basic_obj_respond_to_missing returns Qundef if respond_to_missing is not redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01fix failure on r58981ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01debug.c: more enumsnobu
* debug.c (ruby_dummy_gdb_enums): add enums for RObject, RModule, RString, RArray. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01improve English for a warning messageduerst
On DOSish systems, there is a warning message for \r\n line endings on shebang line. Improve this message from "shebang line ends with \r may cause a problem" to "shebang line ending with \r may cause problems". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01* 2017-06-01svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01rename absolute_path to realpath internally and introduce pathobj.ko1
* vm_core.h: rename absolute_path to realpath because it is expected name. external APIs (#absolute_path methods) are remained. * vm_core.h: remove rb_iseq_location_struct::path and rb_iseq_location_struct::absolute_path and introduce pathobj. if given path equals to given absolute_path (and most of case it is true), pathobj is simply given path String. If it is not same, pathobj is Array and pathobj[0] is path and pathobj[1] is realpath. This size optimization reduce 8 bytes and sizeof(struct rb_iseq_constant_body) is 200 bytes -> 192 bytes on 64bit CPU. To support this change, the following functions are introduced: * pathobj_path() (defined in vm_core.h) * pathobj_realpath() (ditto) * rb_iseq_path() (decl. in vm_core.h) * rb_iseq_realpath() (ditto) * rb_iseq_pathobj_new() (ditto) * rb_iseq_pathobj_set() (ditto) * vm_core.h (rb_binding_t): use pathobj instead of path. If binding is given at eval methods, realpath (absolute_path) was caller's realpath. However, they should use binding's realpath. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e