summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-25Remove an unused declarationTakashi Kokubun
It was unnecessary in b9007b6c548f91e88fd3f2ffa23de740431fa969
2020-02-26kill ST_DEBUG [Bug #16521]卜部昌平
This compile-time option has been broken for years (at least since commit 4663c224fa6c925ce54af32fd1c1cbac9508f5ec, according to git bisect). Let's delete codes that no longer work. Notes: Merged: https://github.com/ruby/ruby/pull/2926
2020-02-26kill USE_RGENGC=0卜部昌平
This compile-time option has been broken for years (at least since commit 49369ef17316cd5d5819b038f286e1d951972b52, according to git bisect). Let's delete codes that no longer works. Notes: Merged: https://github.com/ruby/ruby/pull/2925
2020-02-26avoid #if inside of rb_str_new_cstr卜部昌平
ISO/IEC 9899:1999 section 6.10.3 paragraph 11 explicitly states that "If there are sequences of preprocessing tokens within the list of arguments that would otherwise act as preprocessing directives, the behavior is undefined." rb_str_new_cstr is in fact a macro. We cannot do this. Notes: Merged: https://github.com/ruby/ruby/pull/2925
2020-02-26Cache destination dir.Vít Ondruch
It is not necessary to strip the `destdir` prefix every iteration, when it can be done just once. Notes: Merged: https://github.com/ruby/ruby/pull/2515
2020-02-26Properly detect mode for binaries.Vít Ondruch
.gemspec files specifies not just `bin`, but also other directories. Notes: Merged: https://github.com/ruby/ruby/pull/2515
2020-02-26Use class variable `@src_dir` instead of local `path`.Vít Ondruch
The local `path` variable does not provide any additional value and was kept around just for clarity for easier review of the `extrac_files` method move. Notes: Merged: https://github.com/ruby/ruby/pull/2515
2020-02-26Use local `{dir,prog,data}_mode` variables instead of globals.Vít Ondruch
This just gets the `RbInstall::DirPackage` closer by functionality to `Gem::Package`. Notes: Merged: https://github.com/ruby/ruby/pull/2515
2020-02-26Use `$script_mode` instead of `$prog_mode` for gem inistallation.Vít Ondruch
rbinstall is using `$script_mode` and `$prog_mode`. However, the `$script_mode` fallbacks to `$prog_mode` if not provided. However, RubyGems do not distinguish between `$script_mode` and `$prog_mode`: https://github.com/rubygems/rubygems/blame/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L196 https://github.com/rubygems/rubygems/blame/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L515 https://github.com/rubygems/rubygems/blame/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L543 Comparing the usage of `$script_mode` and `$prog_mode`, it seems that the `$script_mode` should be used where RubyGems expects `$prog_mode`. Notes: Merged: https://github.com/ruby/ruby/pull/2515
2020-02-26Use `Gem::Package` like object instead of monkey patching.Vít Ondruch
1. This is similar to what RubyGems does and it is less magic [[1]]. 2. It avoids deprecated code paths in RubyGems [[2]]. [1]: https://github.com/rubygems/rubygems/blob/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L151 [2]: https://github.com/rubygems/rubygems/blob/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L187 Notes: Merged: https://github.com/ruby/ruby/pull/2515
2020-02-26Fixed for older versionsNobuyoshi Nakada
Fix up 66d1900423e6fb9774c2fe72dba8c2968b54d7ab, `RubyVM::MJIT` is available since ruby 2.6.
2020-02-25Document that Array#index and find_index are aliases [ci skip]Chelsea Corvus (Battell)
Notes: Merged: https://github.com/ruby/ruby/pull/2924 Merged-By: XrXr
2020-02-26* 2020-02-26 [ci skip]git
2020-02-25Increase timeout for CSV test with --jit-waitTakashi Kokubun
To prevent CI failures like http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2739995
2020-02-25Share extracted bundled gems with gems for bundlerNobuyoshi Nakada
Extract bundled gems under ".bundle/gems" and get rid of duplication which cause constant redefinition warnings at `test-all` after `extract-gems` and `test-bundler`. Notes: Merged: https://github.com/ruby/ruby/pull/2922
2020-02-25Prefer dedicated assertion methodNobuyoshi Nakada
2020-02-25ext/-test-/cxxanyargs: use try_link instead卜部昌平
We would like to skip this extension library when libstdc++ is missing. To avoid such situation let's use try_link instead of try_compile.
2020-02-25should be initialize jit_unit->cc_entries.Koichi Sasada
GC can invoke just after allocation of jit_unit->cc_entries so it should be zero-cleared.
2020-02-25should count only string.Koichi Sasada
This code can generate CC objects so we only need to count existing String objects.
2020-02-25prevent GC from mjit worker.Koichi Sasada
ALLOC_N() can causes GC. Sometimes `mjit_copy_job_handler()` can be called by mjit_worker thread which is not a Ruby thread, so we need to prevent GC in this function. This patch has some issues, but I introduce it to pass the tests.
2020-02-25* 2020-02-25 [ci skip]git
2020-02-25Fix wrong documentation for return value of Pathname#fnmatchMasataka Pocke Kuwabara
Notes: Merged: https://github.com/ruby/ruby/pull/2923
2020-02-24Fixed symbol misused as IDNobuyoshi Nakada
`rb_funcallv_public` and `rb_respond_to` require an `ID`, not a `Symbol`. [Bug #16649]
2020-02-24Try with and without "v" prefix for numeric tagNobuyoshi Nakada
2020-02-24Retry checking out the versionNobuyoshi Nakada
rss 0.2.9 is tagged without the "v" prefix.
2020-02-24Update bundled gemsNobuyoshi Nakada
2020-02-24* 2020-02-24 [ci skip]git
2020-02-24Add pattern matching documentationzverok
Add separate doc/syntax/pattern_matching.rdoc, add link to control_expressions.rdoc. The documentation is "reverse-engineered" from Ruby 2.7 behavior and early preview presentations, and corrected by pattern-matching feature author @k-tsj. Notes: Merged: https://github.com/ruby/ruby/pull/2786
2020-02-23Warn non-nil `$/` [Feature #14240]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2920
2020-02-23Warn non-nil `$\` [Feature #14240]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2920
2020-02-23Warn non-nil `$,` in `IO#print` tooNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2920
2020-02-23Revert "Prefer `exe/ruby` to execute from it"Nobuyoshi Nakada
This reverts commit c7b71af9e21b3f0b8fe413a3c20cf4bd633c40d0, as an example in bundler expects untouch PATH.
2020-02-23* 2020-02-23 [ci skip]git
2020-02-22hash.c: [DOC] fix examples for ENV.merge!Marcus Stollsteimer
2020-02-22Expand Symbol#to_proc specs to be clearerBenoit Daloze
2020-02-22Prefer `exe/ruby` to execute from itNobuyoshi Nakada
2020-02-22check USE_MJITKoichi Sasada
iseq->body->jit_unit is not available if USE_MJIT==0 .
2020-02-22Proc from Symbol needs a receiverNobuyoshi Nakada
So its arity should be -2 instead of -1. [Bug #16640] https://bugs.ruby-lang.org/issues/16640#change-84337
2020-02-22CI can be NULL.Koichi Sasada
Unused CI (introduced from peephole optimization, etc) can be NULL so introduce NULL check.
2020-02-22More ENV rdoc [ci skip]Burdette Lamar
Notes: Merged: https://github.com/ruby/ruby/pull/2908 Merged-By: nobu <nobu@ruby-lang.org>
2020-02-22test/readline - allow ENV control of test class creationMSP-Greg
In ruby/ruby, the tests run on both readline & reline by creating four test classes: ``` TestReadline TestReadlineHistory TestRelineAsReadline TestRelineAsReadlineHistory ``` Reline inports the test files and uses them in its CI. Adding the ENV control allows it to only run the `TestRelineAsReadline` classes. Notes: Merged: https://github.com/ruby/ruby/pull/2916
2020-02-22* remove trailing spaces. [ci skip]git
2020-02-22Introduce disposable call-cache.Koichi Sasada
This patch contains several ideas: (1) Disposable inline method cache (IMC) for race-free inline method cache * Making call-cache (CC) as a RVALUE (GC target object) and allocate new CC on cache miss. * This technique allows race-free access from parallel processing elements like RCU. (2) Introduce per-Class method cache (pCMC) * Instead of fixed-size global method cache (GMC), pCMC allows flexible cache size. * Caching CCs reduces CC allocation and allow sharing CC's fast-path between same call-info (CI) call-sites. (3) Invalidate an inline method cache by invalidating corresponding method entries (MEs) * Instead of using class serials, we set "invalidated" flag for method entry itself to represent cache invalidation. * Compare with using class serials, the impact of method modification (add/overwrite/delete) is small. * Updating class serials invalidate all method caches of the class and sub-classes. * Proposed approach only invalidate the method cache of only one ME. See [Feature #16614] for more details. Notes: Merged: https://github.com/ruby/ruby/pull/2888
2020-02-22VALUE size packed callinfo (ci).Koichi Sasada
Now, rb_call_info contains how to call the method with tuple of (mid, orig_argc, flags, kwarg). Most of cases, kwarg == NULL and mid+argc+flags only requires 64bits. So this patch packed rb_call_info to VALUE (1 word) on such cases. If we can not represent it in VALUE, then use imemo_callinfo which contains conventional callinfo (rb_callinfo, renamed from rb_call_info). iseq->body->ci_kw_size is removed because all of callinfo is VALUE size (packed ci or a pointer to imemo_callinfo). To access ci information, we need to use these functions: vm_ci_mid(ci), _flag(ci), _argc(ci), _kwarg(ci). struct rb_call_info_kw_arg is renamed to rb_callinfo_kwarg. rb_funcallv_with_cc() and rb_method_basic_definition_p_with_cc() is temporary removed because cd->ci should be marked. Notes: Merged: https://github.com/ruby/ruby/pull/2888
2020-02-22use RUBY_FUNCTION_NAME_STRING instead of __func__ for rp()Koichi Sasada
2020-02-22* 2020-02-22 [ci skip]git
2020-02-22`Proc` made by `Symbol#to_proc` should be a lambda [Bug #16260]Nobuyoshi Nakada
With refinements, too.
2020-02-22`Proc` made by `Symbol#to_proc` should be a lambda [Bug #16260]Nobuyoshi Nakada
2020-02-22Adjusted indent [ci skip]Nobuyoshi Nakada
2020-02-21[ruby/irb] `yield` outside method definition is a syntax errorNobuyoshi Nakada
https://github.com/ruby/irb/commit/dbc7b059c7