summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-23io.c: read BOM only for readingnobu
* io.c (io_strip_bom): just abandon detecting UTF encoding by BOM unless opened for reading. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23ripper.y: fix word list eventsnobu
* parse.y (parser_skip_words_sep): QWORDS_BEG should not include the first separators in ripper. * parse.y (parser_parse_string): WORDS_SEP should not include the closing parentheses of a word list in ripper, should include spaces at beginning of lines. [ruby-core:83864] [Bug #14126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-23debug.c: include RIMemo in ruby_dummy_gdb_enumsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22lib/set.rb: [DOC] remove empty commentsstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22* 2017-11-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22set.rb: improve docs for Setstomar
* lib/set.rb: [DOC] add examples for Set#replace, add examples for creating a set from a hash with duplicates, simplify and fix style of some other examples, fix typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22* 2017-11-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22parse.y: Fix the locations of NODE_BLOCK_PASSyui-knk
* parse.y (arg_blk_pass): Update the first location of NODE_BLOCK_PASS if nd_head is assigned. e.g. The locations of NODE_BLOCK_PASS is fixed: ``` a(1, &:to_s) ``` * Before ``` NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 11) ``` * After ``` NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 11) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21Fix a typokazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21Use `const void*` instead of `const char*`kazu
Use cast from `char*` to `void*` instead of union in opendir_without_gvl, because convert from `void*` to `char*` without union in nogvl_opendir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21vm_args.c: ec arg of args_setup_kw_parametersnobu
* vm_args.c (args_setup_kw_parameters): use same ec as the caller. make arguments order consistent with other functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21Skip comment linesusa
* template/prelude.c.tmpl (translate): empty (only LF) lines are not necessary. so skip them, but for safety only when they are made from comment line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21fix test_erb.rb [GH-1763]nobu
* test/erb/test_erb.rb (test_run): require stringio. suppress an unused variable warning. From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21check invariant.ko1
* iseq.c (rb_iseq_trace_set): at this point ISEQ_USE_COMPILE_DATA should not be set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21test/ruby/bug-13526.rb: should wait until all threads are stoppederegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-21parse.y: Fix the locations of NODE in percent stringsyui-knk
* parse.y (parser_yylex): token_flush before calling parse_string. Without token_flush the first locations of NODE in percent strings are set to the location of %. e.g. The locations of NODE_STR is fixed: ``` %w[a b] ``` * Before ``` NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4) ("a") NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6) ("b") ``` * After ``` NODE_STR (line: 1, first_lineno: 1, first_column: 3, last_lineno: 1, last_column: 4) ("a") NODE_STR (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 6) ("b") ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20parse.y: Fix the last location of NODE_STR in %wyui-knk
* parse.y: Use @2 to only include a range of tSTRING_CONTENT. e.g. The locations of NODE_STR is fixed: ``` %w[a] ``` * Before ``` NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 5) ``` * After ``` NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20parse.y: Set the last location of NODE_ARRAY in %wyui-knk
* parse.y: list_append uses the locations of the second argument. So we should set the locations of $2 before pass it to list_append. e.g. The locations of NODE_ARRAY is fixed: ``` %w[a b] ``` * Before ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 0, last_column: -1) ``` * After ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20parse.y: Fix the last location of NODE_LIT in %iyui-knk
* parse.y: Use @2 to not include a range of ' '. e.g. The locations of NODE_LIT is fixed: ``` %i[a] ``` * Before ``` NODE_LIT (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 5) ``` * After ``` NODE_LIT (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20* 2017-11-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20parse.y: Set the last location of NODE_ARRAY in %iyui-knk
* parse.y: list_append uses the locations of the second argument. So we should set the locations of $2 before pass it to list_append. e.g. The locations of NODE_ARRAY is fixed: ``` %i[a b] ``` * Before ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 0, last_column: -1) ``` * After ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20[DOC] Fix example result [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20parse.y: Fix the locations of NODE_FCALLyui-knk
* parse.y: Update the locations of NODE_FCALL when nd_args is determined. e.g. The locations of NODE_FCALL is fixed: ``` a 1 ``` * Before ``` NODE_FCALL (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1) ``` * After ``` NODE_FCALL (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 3) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20File.mkfifo releases GVLnormal
mkfifo(3) is subject to the same problems as open(2) on slow filesystems. Release the GVL and let the rest of the VM run while we call mkfifo. * file.c (nogvl_mkfifo): new function (rb_file_s_mkfifo): release GVL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add hadamard_product/entrywise_product.marcandre
Based on a patch by Charley Hutchison. [GH-674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add Matrix{.|#}combinemarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: accept vectors in {h|v}stackmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add explicit coercion #to_matrixmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20win32.c: vm_exit_handlernobu
* win32/win32.c (vm_exit_handler): separate exit handler for resources which must be released at exit of Ruby VM. * win32/win32.c (socklist_insert, constat_handle): install the VM exit handler. * gc.c (ENABLE_VM_OBJSPACE): no longer needs process global object space on Windows too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19Update the last location of NODE_BLOCKyui-knk
* parse.y (block_append_gen): Update the last location of NODE_BLOCK when a tail is appended. e.g. The locations of NODE_BLOCK is fixed: ``` a; b; c ``` * Before ``` NODE_BLOCK (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4) ``` * After ``` NODE_BLOCK (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19test/ruby/bug-13526.rb: Fix to actually refer to an existing fileeregon
* Add Thread.report_on_exception=true to catch problems early. * Increase the number of Thread.pass to let the autoload start. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19Add specs for concurrent Module#autoloaderegon
* When the file does not exist or the constant is not set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19* 2017-11-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19Reorganize Module#autoload to have similar specs next to each othereregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19gc.c: moved ENABLE_VM_OBJSPACE from vm_core.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19file.c (rb_file_s_mkfifo): use mode_t instead of intnormal
mode_t is the correct type for mkfifo(3). This fixes an oversight from r60592 which made the same change to several other functions. * file.c (rb_file_s_mkfifo): use mode_t instead of int git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19file.c: fix 64-bit conversion warnings from r60844normal
* file.c (nogvl_truncate): cast int to VALUE before "void *" (rb_file_s_truncate): cast "void *" to VALUE before int git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19File.readlink and rb_readlink releases GVLnormal
The `readlink' can stall on slow filesystems like `open' and `read' syscalls. Release the GVL and let the rest of the VM function while `readlink' runs. * file.c (nogvl_readlink): new function (readlink_without_gvl): ditto (rb_readlink): use readlink_without_gvl git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18file: File#truncate and File.truncate release GVLnormal
Like IO#write and IO.open, these file operations have unpredictable performance on slow file systems. Allow other threads of the VM to proceed while they are taking place. * file.c (nogvl_truncate): extract from rb_file_s_truncate (rb_file_s_truncate): release GVL (nogvl_ftruncate): extract from rb_file_truncate (rb_file_truncate): release GVL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18addr2line.c: fix r60841 for glibc before 2.22normal
SHF_COMPRESSED was not defined until glibc 2.22, and there are older distros (e.g. Debian 8.x jessie) which do not have this defined. Perhaps it is safe to define SHF_COMPRESSED to (1 << 11) ourselves, too, since ELF should be a standardized format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18* 2017-11-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18explictly skip compressed debug linenaruse
To identify the line of backtrace with ease, show the offset address of library. You can just find the source filename and the line with `addr2line -e libruby.so.2.5.0 0xXXXX` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18parse.y: Fix the locations of NODE_ITERyui-knk
* parse.y: Update the locations of NODE_ITER when nd_iter is determined. e.g. The locations of NODE_ITER is fixed: ``` a {b} ``` * Before ``` NODE_ITER (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 5) ``` * After ``` NODE_ITER (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 5) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18call only with ISEQ_TRACE_EVENTS.ko1
* vm_insnhelper.c (vm_trace): rb_iseq_trace_set() only accepts ISEQ_TRACE_EVENTS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18introduce `trace_events' info for iseq.ko1
* vm_core.h (rb_iseq_t::aux): add `trace_events` which represents which events are enabled on this iseq. With this information, we can skip useless trace-on changes for ISeqs. * vm_trace.c (RUBY_EVENTS_TRACE_BY_ISEQ): moved to iseq.h and rename it with ISEQ_TRACE_EVENTS. * iseq.h: introduce ISEQ_USE_COMPILE_DATA iseq (imemo) flag to represent COMPILE_DATA is available. In other words, iseq->aux.trace_events is not available when this flag is set. * ISEQ_COMPILE_DATA() is changed from a macro. * ISEQ_COMPILE_DATA_ALLOC() is added. * ISEQ_COMPILE_DATA_CLEAR() is added. * iseq.c: use them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18Cannot call rb_thread_call_with{out,}_gvl before running VMusa
* dir.c (opendir_without_gvl, with_gvl_gc_for_fd, opendir_at): check the VM is already initialized before calling rb_thread_call_with{out,}_gvl(). [Bug #14115] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18parse.y: Fix the locations of NODE_DVAR and NODE_LVARyui-knk
* parse.y: Fix the locations of NODE_DVAR and NODE_LVAR when it's a multiple assignment method parameter. e.g. The locations of NODE_DVAR is fixed: ``` a {|(b, c)| d} ``` * Before ``` NODE_DVAR (line: 1, first_lineno: 1, first_column: 4, last_lineno: 1, last_column: 10) ``` * After ``` NODE_DVAR (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 9) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18.gdbinit: fix print_pathobjktsj
$str is not C string but RString. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e