aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* wipworkKazuki Yamaguchi2017-10-149-29/+68
|
* gdbm, dbm, sdbm: remove unnecessary conditionsKazuki Yamaguchi2017-10-063-23/+15
| | | | The dfree and dsize callback functions are never called with NULL.
* gdbm, dbm, sdbm: prevent possible leak in #initializeKazuki Yamaguchi2017-10-063-19/+18
| | | | | | | Allocate struct dbmdata before opening a file in case of out of memory. As a bonus, make ext/dbm and ext/sdbm close the currently open file if any, as ext/gdbm is doing.
* .gdbinit: print_id in rp_id [ci skip]nobu2017-10-062-8/+7
| | | | | | | | | * .gdbinit (rp_id): use print_id instead of calling lookup_id_str() in a debugger context. * symbol.c (ID_ENTRY_UNIT): made visible to debuggers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: super_method of included methodnobu2017-10-066-39/+53
| | | | | | | | | | * proc.c (method_super_method): search the next super method along the included ancestor chain. [ruby-core:83114] [Bug #13973] * vm_method.c (rb_callable_method_entry_without_refinements): return the defined class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: prefer name method result to inspectnobu2017-10-061-11/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* No more ubygems in trunknobu2017-10-062-2/+2
| | | | | | | [Fix GH-1711] Author: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-10-06svn2017-10-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick: avoid unnecessary IO#sync= callnormal2017-10-051-1/+0
| | | | | | | | | | Sockets and pipes are always created with FMODE_SYNC flag already set (otherwise many things would be broken). * lib/webrick/server.rb (accept_client): remove unnecessary IO#sync= call git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed broken `bundle gem` command.hsbt2017-10-054-3/+3
| | | | | | | | | | | This patch is provided by @gyugyu (Yusuke Yagyu) * Remove README* entry from no_install that there is no README* files except README.md.tt * Rename .travis.yml.tt to travis.yml.tt like gitignore.tt [Bug #13975][ruby-dev:50278][fix GH-1710] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: [DOC] about buffering [ci skip]nobu2017-10-051-0/+5
| | | | | | | | * io.c (rb_file_initialize): [DOC] stated that non-tty file is buffered by the default, and added links to related methods. [ruby-core:83081] [Bug #13965] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix KWD2EIDnobu2017-10-052-12/+18
| | | | | | | * parse.y (KWD2EID): should respect the previous callback result for keywords. [ruby-core:83106] [Bug #13971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed invalid gemspec.hsbt2017-10-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-10-05svn2017-10-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Followed up [ruby-core:83093]. Update gemspec attributes.hsbt2017-10-051-1/+9
| | | | | | Added metadata for rubygems.org. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix var_fieldnobu2017-10-042-38/+57
| | | | | | | | | | | | | | | | * parse.y (mlhs_node): dispatch var_field as well as lhs. * parse.y (lhs, var_hs): dispatch var_field before assignable check so it is inside assign_error at a wrong assignment, as well as backref_assign_error. * parse.y (var_field_gen): wrap var_field value with the variable ID. * parse.y (assignable_gen, const_decl_gen): return the callback result on a syntax error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: reserved words as <id>nobu2017-10-041-11/+3
| | | | | | | * parse.y (reswords): declare reserved words as <id> to remove extra cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_sexp.rb: test for fnamenobu2017-10-041-0/+12
| | | | | | | * test/ripper/test_sexp.rb (test_def_fname): test for fname in def statement. [ruby-core:83089] [Bug #13967] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Revert r60102nobu2017-10-041-36/+31
| | | | | | | * parse.y (op): do not set event ID here to dispatch on_op. [ruby-core:83089] [Bug #13967] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2017-10-040-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Dir.empty? releases GVLnormal2017-10-042-24/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | This converts all slow syscalls in the Dir.empty? implementation to release GVL. We avoid unnecessarily GVL release and reacquire for each slow call (opendir, readdir, closedir) and instead only release and acquire the GVL once in the common case. Benchmark results show a small degradation in single-threaded performance: Execution time (sec) name trunk built dir_empty_p 0.689 0.758 Speedup ratio: compare with the result of `trunk' (greater is better) name built dir_empty_p 0.909 * dir.c (rb_gc_for_fd_with_gvl): new function (nogvl_dir_empty_p): ditto (dir_s_empty_p): use new functions to release GVL * benchmark/bm_dir_empty_p.rb: new benchmark [ruby-core:83071] [Feature #13958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: release GVL around lstat(2)normal2017-10-031-6/+27
| | | | | | | | | | | | | | | | | | | | Like stat(2), lstat(2) can be expensive on slow filesystems and should not block other threads. There should be a minor, but not significant slowdowns in single-threaded performance similar to benchmarks around the more-portable stat(2): [ruby-core:83012] [Bug #13941] * file.c (no_gvl_lstat): new function for rb_thread_call_without_gvl (lstat_without_gvl): new wrapper to replace lstat(2) calls (rb_file_s_lstat): s/lstat/&_without_gvl/ (rb_file_lstat): ditto (rb_file_symlink_p): ditto (rb_file_s_ftype): ditto (rb_file_expand_path_internal): ditto (realpath_rec): ditto [ruby-core:83075] [Feature #13963] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-10-04svn2017-10-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: release GVL in File.{setuid?,setgid?,sticky?}normal2017-10-031-3/+1
| | | | | | * file.c (check3rdbyte): use rb_stat to release GVL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix leaked file descriptorkazu2017-10-031-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: backref_assign_errornobu2017-10-031-2/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: extract callback resultsnobu2017-10-031-23/+23
| | | | | | | | * parse.y: stripping wrapping NODEs from ripper callback results, when storing in Array objects. NODEs must not appear in Ruby level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: set ripper event IDs to keyword variablesnobu2017-10-031-7/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-10-03svn2017-10-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: set ripper event ID symbols to operatorsnobu2017-10-031-31/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use rb_hash_new_with_size()nobu2017-10-023-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_call.rb: refine test_safe_callnobu2017-10-021-3/+3
| | | | | | | | * test/ruby/test_call.rb (test_safe_call): rhs should not be evaluated when the receiver is nil. simplified the assertion for [Bug #13964]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: fix stack consitency errornobu2017-10-022-1/+5
| | | | | | | | * compile.c (iseq_compile_each0): fix stack consitency error on attr-assign with safe navigation operator when the receiver is nil, should pop it too. [ruby-core:83078] [Bug #13964] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "vm_eval.c: add rb_yield_assoc_or_values()"glass2017-10-024-23/+53
| | | | | | This reverts commit r60095 to prevent performance degradation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: check null charnobu2017-10-022-2/+8
| | | | | | | | * io.c (ruby_set_inplace_mode): check if null is contained. based on the patch by tommy (Masahiro Tomita) in [ruby-dev:50272]. [Bug #13960] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_argf.rb: indent here docsnobu2017-10-021-311/+367
| | | | | | | | | | * test/ruby/test_argf.rb (assert_src_expected): default line number to caller's location. * test/ruby/test_argf.rb (test_lineno, test_lineno2): get rid of a bug of wrong indentation after $. in Emacs 25.3 ruby-mode.el git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: add rb_yield_assoc_or_values()glass2017-10-024-53/+23
| | | | | | | | | | | | | | The new function rb_yield_assoc_or_values() will reduce branching. * vm_eval.c: add rb_yield_assoc_or_values() * internal.h: ditto * hash.c: use rb_yield_assoc_or_values() * struct.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-additional.el: shorten here-doc markersnobu2017-10-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use `ra` instead of new variables.ko12017-10-021-5/+3
| | | | | | | | * file.c (rb_file_s_rename): `struct rename_args ra` already has members which contain C ptrs. Pointed by MSP-Greg. Thanks! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* catch up r60088 for DOSISH.ko12017-10-021-0/+2
| | | | | | | * file.c (rb_file_s_rename): src and dst are used only on DOSISH env. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: entries for GVL release in File and Dirnormal2017-10-011-0/+3
| | | | | | | | (more to come) * NEWS: updates for [Bug #13941] and [Feature #13951] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2017-10-010-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-10-02svn2017-10-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* File#rename releases GVLnormal2017-10-012-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | rename(2) requires two pathname resolution operations which can take considerable time on slow filesystems, release the GVL so operations on other threads may proceed. On fast, local filesystems, this change results in some slowdown as shown by the new benchmark. I consider the performance trade off acceptable as cases are avoided. benchmark results: minimum results in each 3 measurements. Execution time (sec) name trunk built file_rename 2.648 2.804 Speedup ratio: compare with the result of `trunk' (greater is better) name built file_rename 0.944 * file.c (no_gvl_rename): new function (rb_file_s_rename): release GVL for renames * benchmark/bm_file_rename.rb: new benchmark git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2017-10-010-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: avoid unnecessary call of str_strlen()glass2017-10-012-25/+35
| | | | | | | | | | * string.c (rb_strseq_index): refactor and avoid call of str_strlen() when offset == 0. it will improve performance of String#index and #include? * benchmark/bm_string_index.rb: benchmark for this change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use rb_hash_new_with_size()glass2017-10-014-7/+7
| | | | | | | | | | | | * hash.c: use rb_hash_new_with_size(). * marshal.c: ditto * struct.c: ditto * vm_args.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (UNICODE_DOWNLOAD): set cache directorynobu2017-10-011-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_erb.rb: -i optionnobu2017-10-011-5/+10
| | | | | | * tool/generic_erb.rb: -i option to merge multiple template files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_refinement.rb: test for r59946nobu2017-10-011-0/+15
| | | | | | | | * test/ruby/test_refinement.rb (test_dsym_literal): test for r59946, interning dynamic symbol should not be affected by refinements too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e