summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add internals glossaryAaron Patterson2023-02-091-0/+40
| | | | | I started a glossary to help new contributors navigate the internals of CRuby, and I think we should maintain it in ruby/ruby
* Enhancement github releases generatorHiroshi SHIBATA2023-02-101-1/+21
| | | | | | * Create GitHub Releases by itself * Added help and usage message * Decorate release body
* YJIT: format numbers in stats printouts with comma separators (#7281)Maxime Chevalier-Boisvert2023-02-091-31/+43
|
* YJIT: optimized codegen for `rb_ary_empty_p` (WIP) (#7242)Maxime Chevalier-Boisvert2023-02-091-0/+28
| | | | | | | | | | | * YJIT: add specialized implementation of rb_ary_empty_p() * Update yjit/src/codegen.rs Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> --------- Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
* Rename rb_str_splice_{0,1} -> rb_str_update_{0,1}Matt Valentine-House2023-02-091-6/+6
|
* Remove alias macro rb_str_spliceMatt Valentine-House2023-02-091-7/+5
|
* Copy cvar table on cloneeileencodes2023-02-092-0/+37
| | | | | | | | | | | | When a class with a class variable is cloned we need to also copy the cvar cache table from the original table to the clone. I found this bug while working on fixing [Bug #19379]. While this does not fix that bug directly it is still a required change to fix another bug revealed by the fix in https://github.com/ruby/ruby/pull/7265 This needs to be backported to 3.2.x and 3.1.x. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* Remove unused preprocessor blockPeter Zhu2023-02-091-3/+0
|
* YJIT: Support invokesuper in a block (#7264)Maple Ong2023-02-092-14/+37
| | | | | | | Support invokesuper in a block on YJIT invokesuper previously side exited when it is in a block. To make sure we're compiling the correct method in super, we now use the local environment pointer (LEP) to get the method, which will work in a block. Co-authored-by: John Hawthorn <john@hawthorn.email>
* YJIT: Add counter for megamorphic send (#7274)Takashi Kokubun2023-02-092-1/+4
|
* YJIT: Use the system page size when the code page size is too small (#7267)Alan Wu2023-02-093-30/+63
| | | | | | | | | | | | | | | | | | Previously on ARM64 Linux systems that use 64 KiB pages (`CONFIG_ARM64_64K_PAGES=y`), YJIT was panicking on boot due to a failed assertion. The assertion was making sure that code GC can free the last code page that YJIT manages without freeing unrelated memory. YJIT prefers picking 16 KiB as the granularity at which to free code memory, but when the system can only free at 64 KiB granularity, that is not possible. The fix is to use the system page size as the code page size when the system page size is 64 KiB. Continue to use 16 KiB as the code page size on common systems that use 16/4 KiB pages. Add asserts to code_gc() and free_page() about code GC's assumptions. Fixes [Bug #19400]
* [ruby/irb] Make tests more compatible with TruffleRubyStan Lo2023-02-091-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/514) * Improve encoding error test case The test input IRB currently uses happen to hit a compatibility bug in TruffleRuby, which has been documented in https://github.com/oracle/truffleruby/issues/2848 Although it'll eventually be fixed, we can make the test case support TruffleRuby now by tweaking it just a little bit. Co-authored-by: Kevin Menard <kevin@nirvdrum.com> * Remove redundant TruffleRuby omits/pends Co-authored-by: Kevin Menard <kevin@nirvdrum.com> * Use a different way to test warning emission The test case was added in https://github.com/ruby/irb/commit/d08ef68d2dfbf041d363f65686d78a937954513c to verify that IRB emits Ruby warning as expected. But the subject it uses relies on CRuby's regexp engine, which isn't always used in other language implementations, like TruffleRuby. That's why we ended up skipping TruffleRuby in this test case. Since the test isn't about regexp itself, we can change the testing subject and just remove the special condition for TruffleRuby. Co-authored-by: Kevin Menard <kevin@nirvdrum.com> --------- https://github.com/ruby/irb/commit/6fdf4f3e97 Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
* Merge gc.h and internal/gc.hMatt Valentine-House2023-02-0930-194/+167
| | | | [Feature #19425]
* YJIT: Add counters for ivar exits (#7266)Takashi Kokubun2023-02-092-1/+9
|
* [Bug #19426] Fix endless `Range#step` with `#succ` methodNobuyoshi Nakada2023-02-092-1/+45
|
* [rubygems/rubygems] Avoid crashing with a corrupted lockfileDaniel Colson2023-02-093-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I did a bad thing (script that edits the Gemfile.lock directly) and ended up with a Gemfile.lock that was completely missing some indirect dependencies. While this is my fault and an error is reasonable, I noticed that the error got progressively less friendly in recent versions of bundler. Something similar came up in https://github.com/rubygems/rubygems/issues/6210, and this commit would have helped with that case as well (although we've already handled this a different way with #6219). Details: --- Back on Bundler 2.2.23, a corrupt lockfile like this would cause a helpful error: ``` Unable to find a spec satisfying minitest (>= 5.1) in the set. Perhaps the lockfile is corrupted? ``` Bundler 2.3.26 gave a helpful warning: ``` Warning: Your lockfile was created by an old Bundler that left some things out. Because of the missing DEPENDENCIES, we can only install gems one at a time, instead of installing 16 at a time. You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile. The missing gems are: * minitest depended upon by activesupport ``` But then continued on and crashed while trying to report the unmet dependency: ``` --- ERROR REPORT TEMPLATE ------------------------------------------------------- NoMethodError: undefined method `full_name' for nil:NilClass lib/bundler/installer/parallel_installer.rb:127:in `block (2 levels) in check_for_unmet_dependencies' ... ``` Bundler 2.4.0 and up crash as above when jobs=1, but crash even harder when run in parallel: ``` --- ERROR REPORT TEMPLATE ------------------------------------------------------- fatal: No live threads left. Deadlock? 3 threads, 3 sleeps current:0x00007fa6b6704660 main thread:0x00007fa6b6704660 * #<Thread:0x000000010833b130 sleep_forever> rb_thread_t:0x00007fa6b6704660 native:0x0000000108985600 int:0 * #<Thread:0x0000000108dea630@Parallel Installer Worker #0 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever> rb_thread_t:0x00007fa6b67f67c0 native:0x0000700009a62000 int:0 * #<Thread:0x0000000108dea4a0@Parallel Installer Worker #1 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever> rb_thread_t:0x00007fa6b67f63c0 native:0x0000700009c65000 int:0 <internal:thread_sync>:18:in `pop' tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:42:in `deq' ... ``` Changes --- This commit fixes the confusing thread deadlock crash by detecting if dependencies are missing such that we'll never be able to enqueue. When that happens we treat it as a failure so the install can finish. That gets us back to the `NoMethodError`, which this commit fixes by using a different warning in the case where no spec is found. https://github.com/rubygems/rubygems/commit/d73001a21d
* Avoid to duplicate entries that own redmine and github idsHiroshi SHIBATA2023-02-091-6/+5
|
* Remove `REG_LITERAL` flagNobuyoshi Nakada2023-02-091-4/+0
| | | | All `Regexp` literals are frozen now.
* Added helper script for generate github releasesHiroshi SHIBATA2023-02-091-0/+40
|
* [rubygems/rubygems] Improve wording of unmet dependencies warningDaniel Colson2023-02-082-4/+4
| | | | | | | | | | | | | | | `trying to manually editing` doesn't seem quite grammatically correct. We could change it to `trying to manually edit` (is that a split infinitive?), but I don't think `trying to` adds much here so I've removed it instead so `editing` is the verb. For the list of dependencies, the wording before this commit seemed to reverse the dependency. "B, depended on A" sounds like B depends on A (or did in the past but doesn't anymore?), but that's not correct. I think there's a missing word: "B, depended on by A", but I find "B, dependency of A" a bit nicer. https://github.com/rubygems/rubygems/commit/49a31257e3
* Rename iseq_mark_and_update to iseq_mark_and_movePeter Zhu2023-02-084-7/+7
| | | | The new name is more consistent.
* [DOC] Refine/fix doc/contributing/building_ruby.md [ci skip]Nobuyoshi Nakada2023-02-081-3/+7
| | | | | | * Separate dependencies for RubyGems * Add reasons of optional libraries * Add a note for gperf and fix the required version
* Use Thread.pass until thread.stop? to wait for thread to blockJean Boussier2023-02-081-1/+1
| | | | | | [Bug #19415] It should be more reliable
* Add TAGS rule [ci skip]Nobuyoshi Nakada2023-02-082-0/+22
|
* Only emit circular dependency warning for owned thread shieldsJean byroot Boussier2023-02-086-4/+29
| | | | | | | | | | [Bug #19415] If multiple threads attemps to load the same file concurrently it's not a circular dependency issue. So we check that the existing ThreadShield is owner by the current fiber before warning about circular dependencies.
* Add RUBY_GC_HEAP_INIT_SIZE_%d_SLOTS to pre-init pools granularlyJean Boussier2023-02-083-5/+41
| | | | | | | | The old RUBY_GC_HEAP_INIT_SLOTS isn't really usable anymore as it initalize all the pools by the same factor, but it's unlikely that pools will need similar sizes. In production our 40B pool is 5 to 6 times bigger than our 80B pool.
* Removed svn feature from make-snapshotHiroshi SHIBATA2023-02-081-8/+3
|
* Replace `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED`Nobuyoshi Nakada2023-02-084-13/+15
|
* Replace `PACKED_STRUCT` in includeNobuyoshi Nakada2023-02-081-3/+4
|
* Extract include/ruby/internal/attr/packed_struct.hNobuyoshi Nakada2023-02-0899-21/+411
| | | | | | | | | Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the macros bellow: * `RBIMPL_ATTR_PACKED_STRUCT_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_END` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
* Use more agressive RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR for GC testsJean Boussier2023-02-071-4/+6
|
* Revert "Revert "Consider DATA objects without a mark function as protected""Jean byroot Boussier2023-02-071-2/+3
| | | | This reverts commit 6eae8e5f514db716e52ad06a2ac97e2cc3910d83.
* [rubygems/rubygems] Add Ruby 3.2 and 3.3 platforms to Gemfile DSLDaniel Colson2023-02-074-4/+25
| | | | | | | | | | | | Along the same lines as https://github.com/rubygems/rubygems/pull/5469, this adds support for Ruby 3.2 and 3.3 platforms: `:ruby_32`, `mri_32`, etc. It also includes a spec that should help catch this earlier in the future, failing if we don't support platforms for the version of Ruby that is running the tests. https://github.com/rubygems/rubygems/commit/7cd19d824d
* * remove trailing spaces. [ci skip]git2023-02-071-1/+1
|
* Make Time objects WB protectedPeter Zhu2023-02-072-40/+73
| | | | Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
* Remove unused code in time.cPeter Zhu2023-02-071-102/+4
| | | | Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
* Fix confusing "Benoit Daloze2023-02-071-1/+1
|
* Add Building the Tarball section in distribution docsBenoit Daloze2023-02-071-0/+4
|
* Clarify section about getting the Ruby tarballBenoit Daloze2023-02-071-8/+14
|
* Use write barriers for Backtrace objectsJohn Hawthorn2023-02-071-5/+6
| | | | | | | | | Backtrace objects hold references to: * iseqs - via the captured locations * strary - a lazily allocated array of strings * locary - a lazily allocated array of backtrace locations Co-authored-by: Adam Hess <HParker@github.com>
* Fix typo in gc.h [ci skip]Peter Zhu2023-02-071-1/+1
|
* [ruby/net-http] Enhanced RDoc for Net::HTTPBurdetteLamar2023-02-071-6/+13
| | | | https://github.com/ruby/net-http/commit/e65a3d9f11
* [ruby/net-http] [DOC] Reorganize doc for proxy serverBurdette Lamar2023-02-071-98/+100
| | | | | | (https://github.com/ruby/net-http/pull/117) https://github.com/ruby/net-http/commit/f8b6b76cba
* Revert "Consider DATA objects without a mark function as protected"Jean Boussier2023-02-071-3/+2
| | | | This reverts commit 6e4c242130965de1cf00703c99f8821b0bd19e5b.
* Use rb_gc_mark_and_move for method objectsPeter Zhu2023-02-071-22/+8
|
* Use rb_gc_mark_and_move for proc and bindingPeter Zhu2023-02-071-54/+17
| | | | Also makes VM_ENV_ENVVAL movable.
* [ruby/reline] Add comment for unused constantsima1zumi2023-02-071-0/+1
| | | | | | | | FILENAME_COMPLETION_PROC and USERNAME_COMPLETION_PROC are not used by Reline. However, they were added for compatibility with the rb-readline gem. These constants have been retained and comments added. https://github.com/ruby/reline/commit/98fdbd3f18
* Mentioned gmp at requirementsHiroshi SHIBATA2023-02-071-0/+1
|
* Update default gems list at a66bc448a40929207fcf6e97107d71 [ci skip]git2023-02-071-1/+1
|
* [ruby/psych] Bump version to 5.1 for releaseCharles Oliver Nutter2023-02-071-1/+1
| | | | | | | | | This version primarily updates the JRuby extension to use SnakeYAML Engine, a newer version of the SnakeYAML library, which also updates YAML support to 1.2. The JRuby extension now also exposes settings for the parser. https://github.com/ruby/psych/commit/6f2b16b343