summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-22[rubygems/rubygems] rubygems.rb is required by gem_runner.rbHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/503f763865
2022-07-22[rubygems/rubygems] Removed needless value assignmentHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/5825c4c2e8
2022-07-22Revive .indent.pro with adding `-nut`(`--no-tabs`) [ci skip]Nobuyoshi Nakada
2022-07-22Add .git-blame-ignore-revsTakuya Noguchi
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22RubyGems: Enable Style/StringLiterals copTakuya Noguchi
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22Make Gem::SystemExitException properly exit with a given codeAkinori MUSHA
The cause was in how Gem::SystemExitException initializes itself. It didn't pass an exit code to the super method. See the document of SystemExit.new() for details. Notes: Merged: https://github.com/ruby/ruby/pull/6167
2022-07-22bin/gem: remove initial empty lineKenyon Ralph
Notes: Merged: https://github.com/ruby/ruby/pull/6167
2022-07-22Removed needless condition for old versions of Ruby.SHIBATA Hiroshi
Notes: Merged: https://github.com/ruby/ruby/pull/6167
2022-07-22Enable Style/MultilineIfThen in Rubocopbronzdoc
Notes: Merged: https://github.com/ruby/ruby/pull/6167
2022-07-22Remove trailing blank linesDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/6167
2022-07-22Improve user-facing messages by consistent casing of Ruby/RubyGemsJohn Labovitz
(when it referred to the general concept and not a path), single-spacing between sentences, and a few other small issues. Notes: Merged: https://github.com/ruby/ruby/pull/6167
2022-07-22Get rid of magic numbersNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6166
2022-07-22Dump non-ASCII char as unsignedNobuyoshi Nakada
Non-ASCII code may be negative on platforms plain char is signed. Notes: Merged: https://github.com/ruby/ruby/pull/6166
2022-07-21Do not chomp trailing line separator IO#each with nil separator and chompJeremy Evans
nil separator means no sepator, so chomp should not remove a line separator. Partially Fixes [Bug #18770] Notes: Merged: https://github.com/ruby/ruby/pull/6164
2022-07-21Remove unused variable in array.cPeter Zhu
array.c:460:14: warning: unused variable 'len' [-Wunused-variable] long len = ARY_HEAP_LEN(ary);
2022-07-21Remove check for shared root arraysPeter Zhu
All shared root arrays should not be on the transient heap. ary_make_shared evacuates arrays from the transient heap when creating shared roots.
2022-07-21Revert "objspace_dump.c: skip dumping method name if not pure ASCII"Jean byroot Boussier
This reverts commit 79406e3600862bbb6dcdd7c5ef8de1978e6f916c. Notes: Merged: https://github.com/ruby/ruby/pull/6165
2022-07-22Remove the file that was probably added by accident [ci skip]Nobuyoshi Nakada
2022-07-21Add .git-blame-ignore-revs [ci skip]Takashi Kokubun
for [Misc #18891] It is a file that could be used with `git config blame.ignoreRevsFile`. The file name `.git-blame-ignore-revs` is natively supported by GitHub, so you don't need anything else to make it work on GitHub. https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view However, for your local git repository use, if you configure `blame.ignoreRevsFile` globally, git expects you to have the file in every git repository you use, which is nearly impossible. So, for your local development, you're supposed to use this file with: ``` git config --local blame.ignoreRevsFile .git-blame-ignore-revs ```
2022-07-21objspace_dump.c: skip dumping method name if not pure ASCIIJean Boussier
Sidekiq has a method named `❨╯°□°❩╯︵┻━┻`which corrupts heap dumps. Normally we could just dump is as is since it's valid UTF-8 and need no escaping. But our code to escape control characters isn't UTF-8 aware so it's more complicated than it seems. Ultimately since the overwhelming majority of method names are pure ASCII, it's not a big loss to just skip it. Notes: Merged: https://github.com/ruby/ruby/pull/6161
2022-07-21Expand tabs [ci skip]Takashi Kokubun
[Misc #18891] Notes: Merged: https://github.com/ruby/ruby/pull/6094
2022-07-21Remove macOS 10.15 from CIPeter Zhu
macOS 10.15 is deprecated on GitHub Actions and will have periodic brownouts. See actions/virtual-environments#5583. Notes: Merged: https://github.com/ruby/ruby/pull/6162
2022-07-21Revert "Do not chomp trailing line separator IO#each with nil separator and ↵Jeremy Evans
chomp" This reverts commit 04f86ad0b5d2fe4711ff300d855228a6aed55f33. This is causing CI issues, reverting for now.
2022-07-21Do not have class/module keywords look up ancestors of ObjectJeremy Evans
Fixes case where Object includes a module that defines a constant, then using class/module keyword to define the same constant on Object itself. Implements [Feature #18832] Notes: Merged: https://github.com/ruby/ruby/pull/6048
2022-07-21Do not chomp trailing line separator IO#each with nil separator and chompJeremy Evans
nil separator means no sepator, so chomp should not remove a line separator. Partially Fixes [Bug #18770] Notes: Merged: https://github.com/ruby/ruby/pull/5959
2022-07-22* 2022-07-22 [ci skip]git
2022-07-21Make String#each_line work correctly with paragraph separator and chompJeremy Evans
Previously, it was including one newline when chomp was used, which is inconsistent with IO#each_line behavior. This makes behavior consistent with IO#each_line, chomping all paragraph separators (multiple consecutive newlines), but not single newlines. Partially Fixes [Bug #18768] Notes: Merged: https://github.com/ruby/ruby/pull/5960
2022-07-21[Bug #18929] Fix heap creation thrashing in GCPeter Zhu
Before this commit, if we don't have enough slots after sweeping but had pages on the tomb heap, then the GC would frequently allocate and deallocate pages. This is because after sweeping it would set allocatable pages (since there were not enough slots) but free the pages on the tomb heap. This commit reuses pages on the tomb heap if there's not enough slots after sweeping. Notes: Merged: https://github.com/ruby/ruby/pull/6156
2022-07-21Update common sources including id.h after updateNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6159
2022-07-21string.c: use str_enc_fastpath in TERM_LENJean Boussier
Not having to fetch the rb_encoding save a significant amount of time. Additionally, even when we have to fetch it, we can do it faster using `ENCODING_GET` rather than `rb_enc_get`. ``` compare-ruby: ruby 3.2.0dev (2022-07-19T08:41:40Z master cb9fd920a3) [arm64-darwin21] built-ruby: ruby 3.2.0dev (2022-07-21T11:16:16Z faster-buffer-conc.. 4f001f0748) [arm64-darwin21] warming up... | |compare-ruby|built-ruby| |:---------------------|-----------:|---------:| |binary_concat_utf8 | 510.580k| 565.600k| | | -| 1.11x| |binary_concat_binary | 512.653k| 571.483k| | | -| 1.11x| |utf8_concat_utf8 | 511.396k| 566.879k| | | -| 1.11x| ``` Notes: Merged: https://github.com/ruby/ruby/pull/6160
2022-07-21Add comment in array.c about flagsPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/6157
2022-07-21Add RARRAY_SHARED_FLAGPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/6157
2022-07-21Refactor macros of array.cPeter Zhu
Move some macros in array.c to internal/array.h so that other files can also access these macros. Notes: Merged: https://github.com/ruby/ruby/pull/6157
2022-07-21Remove unused internal macros in rarray.hPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/6157
2022-07-21[ruby/digest] Ignore test_ractor.rb on non-Ractor rubyNobuyoshi Nakada
https://github.com/ruby/digest/commit/352b8c1636
2022-07-21[ruby/digest] Find an available digest algorithm to testNobuyoshi Nakada
https://github.com/ruby/digest/commit/8844716793
2022-07-20Prevent the stack from being marked twiceAaron Patterson
This commit prevents the stack from being marked twice: once via the Fiber, and once via the Thread. It introduces an assertion to assert that the ec on the thread is the same as the ec on the Fiber being marked via the thread. Notes: Merged: https://github.com/ruby/ruby/pull/6123
2022-07-20Ensure _id2ref finds symbols with the correct typeDaniel Colson
Prior to this commit it was possible to call `ObjectSpace._id2ref` with an offset static symbol object_id and get back a new, incorrectly tagged symbol: ``` > sensible_sym = ObjectSpace._id2ref(:a.object_id) => :a > nonsense_sym = ObjectSpace._id2ref(:a.object_id + 40) => :a > sensible_sym == nonsense_sym => false ``` `nonsense_sym` ends up tagged with `RUBY_ID_INSTANCE` instead of `RB_ID_LOCAL`. That means we can do silly things like: ``` > foo = Object.new > foo.instance_variable_set(:a, 123) (irb):2:in `instance_variable_set': `a' is not allowed as an instance variable name (NameError) > foo.instance_variable_set(ObjectSpace._id2ref(:a.object_id + 40), 123) => 123 > foo.instance_variables => [:a] ``` This was happening because `get_id_entry` ignores the tag bits when looking up the symbol. So `rb_id2str(symid)` would return a value and then we'd continue on with the nonsense `symid`. This commit prevents the situation by checking that the `symid` actually matches what we get back from `get_id_entry`. Now we get a `RangeError` for the nonsense id: ``` > ObjectSpace._id2ref(:a.object_id) => :a > ObjectSpace._id2ref(:a.object_id + 40) (irb):1:in `_id2ref': 0x000000000013f408 is not symbol id value (RangeError) ``` Co-authored-by: John Hawthorn <jhawthorn@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/6147
2022-07-20Add RARRAY_LITERAL_FLAG for array literalsPeter Zhu
Array created as literals during iseq compilation don't need a reference count since they can never be modified. The previous implementation would mutate the hidden array's reference count, causing copy-on-write invalidation. This commit adds a RARRAY_LITERAL_FLAG for arrays created through rb_ary_literal_new. Arrays created with this flag do not have reference count stored and just assume they have infinite number of references. Co-authored-by: Jean Boussier <jean.boussier@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/6151
2022-07-21* 2022-07-21 [ci skip]git
2022-07-20YJIT: Skip setlocal WB check for immediate values (#6122)John Hawthorn
Write barriers may be required when VM_ENV_FLAG_WB_REQUIRED is set, however write barriers only affect heap objects being written. If we know an immediate value is being written we can skip this check. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-07-20Match +YJIT in Ruby desc when testing segv (#6141)Noah Gibbs
In test_bug_reporter and test_rubyoptions we intentionally test child processes that cause SEGV. We run them with YJIT if the parent uses YJIT so that the text description matches the parent RUBY_DESCRIPTION. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-07-20[Bug #18928] Fix crash in WeakMapPeter Zhu
In wmap_live_p, if is_pointer_to_heap returns false, then the page is either in the tomb or has already been freed, so the object is dead. In this case, wmap_live_p should return false. Notes: Merged: https://github.com/ruby/ruby/pull/6152
2022-07-20[rubygems/rubygems] Fix `ruby setup.rb --destdir /foo` modifying global specsDavid Rodríguez
Running a command like that is actually removing any previous default bundler specs in the default RubyGems installation (outside of destdir). It should instead only modify destdir. https://github.com/rubygems/rubygems/commit/5ed275383c
2022-07-20[rubygems/rubygems] Refactor destdir checksDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ca956c0de2
2022-07-20[rubygems/rubygems] More cleanupDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6012800a20
2022-07-20[rubygems/rubygems] Unify common logicDavid Rodríguez
https://github.com/rubygems/rubygems/commit/e5434be14c
2022-07-20[rubygems/rubygems] Bundler: update primary source in man 5 gemfileTakuya Noguchi
Specifying multiple primary sources in top-level was deprecated in Bundler 1.13. As Bundler CLI uses primary source instead of global, "global source" is replaced with "primary source". Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com> https://github.com/rubygems/rubygems/commit/1dd1753f6e
2022-07-20Fix free objects count conditionNobuyoshi Nakada
Free objects have `T_NONE` as the builtin type. A pointer to a valid array element will never be `NULL`. Notes: Merged: https://github.com/ruby/ruby/pull/6153 Merged-By: nobu <nobu@ruby-lang.org>
2022-07-20Mark ruby scripts in YAML [ci skip]Nobuyoshi Nakada
```elisp (mmm-ify-by-regexp 'ruby-mode "^ *#!.*ruby" 0 "^ *shell: *ruby.*{0}" 0 0) ```