summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-12-13[rubygems/rubygems] Fix restarting with locked version when $PROGRAM_NAME ↵Camden Narzt
has been changed Use Process.argv0 instead of $PROGRAM_NAME because $PROGRAM_NAME is liable to be changed but Process.argv0 is not. https://github.com/rubygems/rubygems/commit/43b747dc9e
2024-12-13Bundle typeprof 0.30.0Yusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/12332
2024-12-13Add a note about `Symbol#to_s` returning a chilled string in NEWSJean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/12334
2024-12-13Update NEWS.md with Time#xmlschema, Array#fetch_values and ↵Jean Boussier
String#append_as_bytes Notes: Merged: https://github.com/ruby/ruby/pull/12334
2024-12-13followup 0bdb38ba6be208064a514c12a9b80328645689f8Koichi Sasada
(forgot to amend...) Notes: Merged: https://github.com/ruby/ruby/pull/12331
2024-12-13Launchable: Refactor entrypoint.sh (#12314)Naoto Ono
* Use `launchable record session` command to split test sessions based on test suites. * Use BTESTS env instead of RUBY_TESTOPTS for passing CLI option to `make btest`. * Group Launchable logs * Add several flavors to identify the relationship between test session and GH workflow. Notes: Merged-By: ono-max <onoto1998@gmail.com>
2024-12-13Fixed compatibility error with setup command and rdoc plugin on rubygemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12330
2024-12-13Removed unnecessary plugin file in ruby/ruby repositoryHiroshi SHIBATA
2024-12-13Make it loose coupling between RubyGems and RDoc (#1171)mterada1228
* Make it loose coupling between RubyGems and RDoc \### Problems There are following problems because of tight coupling between RubyGems and RDoc. 1. If there are braking changes in RDoc, RubyGems is also broken. 2. When we maintain RDoc, we have to change RubyGems. The reason why they are happened is that RubyGems creates documents about a gem with installing it. Note that RubyGems uses functions of RDoc to create documents. Specifically, - Creating documents is executed by `rubygems/lib/rubygems/rdoc.rb`. - `::RDoc::RubygemsHook` which is defined by RDoc is called by the file. \### Solution RubyGems has the plugin system. If a gem includes `rubygems_plugin.rb`, RubyGems loads it. RubyGems executes a process defined in it while installing gems, uninstalling gems or other events. We can use the system to solve the problems. The root cause is RubyGems directly references the class of RDoc. We can remove the root cause by making RDoc RubyGems plugin. Alternatively `rubygems_plugin.rb` creates documents about gems. \### FAQ Q1. Do we need to change codes of RubyGems? A. No, we don't. This change keeps compatibility of API used from RubyGems. Q2. Is it better to delete existing codes related to RDoc in RubyGems? No, it isn't. If we change codes of RubyGems, we can't keep a compatibility. Example: If we delete codes that uses `RDoc::RubygemsHook` in `rubygems/lib/rubygems/rdoc.rb`, documentations are not created with old RDoc. Q3. When can we delete `rubygems/lib/rubygems/rdoc.rb`? A. We can delete it when all users use RDoc including `rubygems_plugin`. Next ruby version is 3.4. If it includes the RDoc including `rubygems_plugin`, we can delete `rubygems/lib/rubygems/rdoc.rb` after ruby 3.3 is EOL. Q4. Is it a breaking change that Rubygems creates documents with rubygems_plugin not RDoc::RubygemsHook? A. No, it isn't. If we simply implement this approach, we move the implementation from `rdoc/lib/rdoc/rubygems_hook.rb` to `rubygems_plugin.rb`. This way can be breaking change. It seems to be fine that we just need to delete `rdoc/rubygems_hook.rb` but it doesn't work. It generates multiple documents. `rubygems/lib/rubygems/rdoc.rb` has the following code. ``` begin require "rdoc/rubygems_hook" # ... rescue LoadError end ``` This code ignores RDoc related processes when `rdoc/rubygems_hook` can't be required. But, this 'require' is not failed. This is because Ruby installs Rdoc as a default gem. So, Rdoc installed as a default gem generates documents and one installed as a normal gem does it too. If you think that this behavior is accectable, we can just delete `rdoc/rubygems_hook.rb`. What do you think about this approach? In this change, we take another approach to solve the problem that creates multiple documents. If `Gem.done_installing(&Gem::RDoc.method(:generation_hook))` in `rubygems/rdoc.rb` doesn't create documents, we can solve the problem. We have some options. * We change `rubygems/rdoc.rb` and then don't execute `Gem.done_installing`. (This is a change for RubyGems.) * We change `rdoc/rubygems_hook.rb` and then make `generation_hook` a no-op method. (This is a change for RDoc.) We choose the latter to avoid changing for RubyGems. \### Test \#### Preparation Install Rdoc which including our changes by executing `rake install`. ❯ rake install We confirmed that Rdoc which including our changes was installed. ❯ gem list | grep rdoc rdoc (6.6.0, default: 6.4.0) \#### Check point We tested to check compatibility. How to chack the compatibility? We tested creating same documents by our RDoc and old RDoc with latest RubyGems. We used following versions to test. ``` ❯ ruby -v ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin22] ❯ gem list | grep rdoc rdoc (default: 6.4.0) ❯ ruby -I rubygems/lib rubygems/exe/gem --version 3.5.14 ``` Here is a result of test with old RDoc. We can see that the document is created correctlly with `Parsing...` and `Done installing...`. ``` ❯ ruby -I rubygems/lib rubygems/exe/gem install pkg-config Successfully installed pkg-config-1.5.6 Parsing documentation for pkg-config-1.5.6 Done installing documentation for pkg-config after 0 seconds 1 gem installed ``` Here is a result of test with our RDoc. We can see that the document is created correctlly with `Parsing...` and `Done installing...`. ``` ❯ ruby -I rubygems/lib rubygems/exe/gem install pkg-config Successfully installed pkg-config-1.5.6 Parsing documentation for pkg-config-1.5.6 Done installing documentation for pkg-config after 0 seconds 1 gem installed ``` As you can see we got the same results, our RDoc keeps compatibility. * rename a test file * Revert "rename a test file" This reverts commit 70a144bf3fb8f2cc653972e858b5fed3747765d7. * revert a test class name * exclude `TestRDocRubyGemsHook` at job of ruby-core * When `rubygems_plugin.rb` is not found, `test_rdoc_rubygems_hook.rb` is skipped. * remove unnecessary whitespace * add comment * Add support for the case that RDoc is installed as a default gem * Fix problems Co-authored-by: mterada1228 <49284339+mterada1228@users.noreply.github.com> * Simplify * removed unused blank lines and revert test * for rerun tests * add comment for rubygems_plugin.rb --------- Co-authored-by: Sutou Kouhei <kou@clear-code.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
2024-12-13[DOC] Update `rb_strlen_lit`Nobuyoshi Nakada
It is not "in bytes" for wide char literal.
2024-12-13Bump github/codeql-action from 3.27.7 to 3.27.9dependabot[bot]
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.7 to 3.27.9. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/babb554ede22fd5605947329c4d04d8e7a0b8155...df409f7d9260372bd5f19e5b04e83cb3c43714ae) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/12327
2024-12-13[DOC] Move the comma outside the `<tt>` tagNobuyoshi Nakada
2024-12-13Bump vendored uri to 1.0.2David Rodríguez
2024-12-13Bump vendored net-http to 0.6.0David Rodríguez
2024-12-13Bump vendored securerandom to 0.4.0David Rodríguez
2024-12-13[rubygems/rubygems] Add note about why we don't use `Open3`David Rodríguez
https://github.com/rubygems/rubygems/commit/72316ed2fa
2024-12-13[rubygems/rubygems] No need for `--quiet` since we hide output by defaultDavid Rodríguez
https://github.com/rubygems/rubygems/commit/77133a23f5
2024-12-13[rubygems/rubygems] Don't print a bunch of blank lines when setting up ↵David Rodríguez
dependencies https://github.com/rubygems/rubygems/commit/48fd2d0514
2024-12-12Improve "Building Ruby" docs (#12320)Alexander Momchilov
* Clarify “Building Ruby” docs * Fix test examples to work from `build` dir * Clarify “Testing Ruby” examples with real examples All the commands should run correctly by default, without the user needing to modify them. This builds confidence that the relative paths are working correct from within the `build` directory. Also, let’s use a consistent example throughout, for greater clarity. * Improve examples to use `-v` flag in-context This shows the correct way to combine `-v` with another parameter, e.g. a specific file to test. * Other readability improvements * Clarify `make` implementation support
2024-12-13[ruby/resolv] Allow setting default Resolv::DNS config in Resolv.newJeremy Evans
If a positional argument is provided, the use_ipv6 keyword option is ignored: ```ruby Resolv.new([Resolv::DNS.new], use_ipv6: false) ``` Issue a warning in this case. Currently, you have to pass a positional hash argument to set the DNS config. However, after support for the use_ipv6 keyword argument is removed, you will be able to pass either a positional hash or keyword arguments. Code that was just specifying the use_ipv6 keyword optional will still work correctly in that case. https://github.com/ruby/resolv/commit/5ff9dda991
2024-12-12[DOC] Improve formatting in Markdown files (#12322)Alexander Momchilov
* Fix WASM bullet/code indentation * Use `console` code highlighting where appropriate … which handles the prefix `$` correctly. * Migrate feature proposal template to MarkDown * Set language on code blocks
2024-12-13Update default gems list at 43faf09bb9ca325ca042ba725a923f [ci skip]git
2024-12-13[ruby/resolv] Bump up v0.6.0Hiroshi SHIBATA
https://github.com/ruby/resolv/commit/cb4b335034
2024-12-13Update default gems list at 573c18212886cc95a47ed16b740099 [ci skip]git
2024-12-13Lock released version of stringio-3.1.2Hiroshi SHIBATA
2024-12-13[ruby/logger] Bump up v1.6.3Hiroshi SHIBATA
https://github.com/ruby/logger/commit/97bce95f49
2024-12-12bootstraptest: On -j failure, show total test countAlan Wu
It used to always try to divide by zero like: FAIL 1/0 tests failed
2024-12-13Update default gems list at f5850c0cf762717892a76ed9630316 [ci skip]git
2024-12-13[ruby/shellwords] Bump up v0.2.2Hiroshi SHIBATA
https://github.com/ruby/shellwords/commit/55ab74d37a
2024-12-13Update default gems list at 5a9008516a4cf9e3006b402fad966e [ci skip]git
2024-12-13[ruby/zlib] Bump up v3.2.1Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/d2e29b23c8
2024-12-12Add an environment variable for controlling the default Thread quantumAaron Patterson
This commit adds an environment variable `RUBY_THREAD_TIMESLICE` for specifying the default thread quantum in milliseconds. You can adjust this variable to tune throughput, which is especially useful on multithreaded systems that are mixing CPU bound work and IO bound work. The default quantum remains 100ms. [Feature #20861] Co-Authored-By: John Hawthorn <john@hawthorn.email> Notes: Merged: https://github.com/ruby/ruby/pull/11981
2024-12-12YJIT: Allow then-unknown `static_mut_refs` on older Rusts [ci skip]Alan Wu
2024-12-12Fix error messages so we don't output an extra lineAaron Patterson
Before this commit, when a file ended with a newline, the syntax error message would show an extra line after the file. For example, the error message would look like this: ``` [aaron@tc-lan-adapter ~/g/ruby (master)]$ echo "foo(" > test.rb [aaron@tc-lan-adapter ~/g/ruby (master)]$ od -c test.rb 0000000 f o o ( \n 0000005 [aaron@tc-lan-adapter ~/g/ruby (master)]$ wc -l test.rb 1 test.rb [aaron@tc-lan-adapter ~/g/ruby (master)]$ ./miniruby test.rb test.rb: test.rb:1: syntax error found (SyntaxError) > 1 | foo( | ^ unexpected end-of-input; expected a `)` to close the arguments 2 | ``` This commit fixes the "end of line" book keeping when printing an error so that there is no extra line output at the end of the file: ``` [aaron@tc-lan-adapter ~/g/ruby (fix-last-line-error)]$ echo "foo(" | ./miniruby -: -:1: syntax error found (SyntaxError) > 1 | foo( | ^ unexpected end-of-input; expected a `)` to close the arguments [aaron@tc-lan-adapter ~/g/ruby (fix-last-line-error)]$ echo -n "foo(" | ./miniruby -: -:1: syntax error found (SyntaxError) > 1 | foo( | ^ unexpected end-of-input; expected a `)` to close the arguments ``` Notice that in the above example, the error message only displays one line regardless of whether or not the file ended with a newline. [Bug #20918] [ruby-core:120035] Notes: Merged: https://github.com/ruby/ruby/pull/12324
2024-12-12[DOC] Fix grammar errors, typos, and improve readability of trace_point.rb ↵Stan Lo
(#12150) Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2024-12-12Fix LoadError's linking issueStan Lo
Original issue: https://github.com/ruby/rdoc/issues/1128 The problem is caused by the `# :stopdoc:` directive in `bundled_gems.rb`, which's scope covers the redefinition of `LoadError`. Since the goal of `# :stopdoc:` is to hide the documentation of `Gem::BUNDLED_GEMS`, we can use `# :nodoc:` on it instead. Notes: Merged: https://github.com/ruby/ruby/pull/12317
2024-12-13`Ractor.set_if_absent(key)`Koichi Sasada
to initialize ractor local storage in thread-safety. [Feature #20875] Notes: Merged: https://github.com/ruby/ruby/pull/12321
2024-12-12Call rb_bug_without_die when ASAN error reportedPeter Zhu
This will give us the Ruby stack trace when an ASAN error is reported. Notes: Merged: https://github.com/ruby/ruby/pull/12309
2024-12-12Don't output memory map in crash report for ASANPeter Zhu
ASAN maps a large amount of memory, which makes the memory map section massive. Notes: Merged: https://github.com/ruby/ruby/pull/12309
2024-12-12Implement rb_bug_without_diePeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/12309
2024-12-12[ruby/irb] Load history when starting a direct debug sessionJames Reid-Smith
(https://github.com/ruby/irb/pull/1046) * Load history when starting a direct debug session When starting a debug session directly with RUBY_DEBUG_IRB_CONSOLE=1 and `require 'debug'; debugger`, IRB's history wasn't loaded. This commit ensures history is loaded in this case by calling `load_history` when configuring IRB for the debugger. Fixes ruby/irb#975 * Update test/irb/test_history.rb * Update lib/irb/debug.rb --------- https://github.com/ruby/irb/commit/7f851b5353 Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-12-12[ruby/reline] Undo and redo should restore indentationtomoya ishida
(https://github.com/ruby/reline/pull/793) * Undo and redo should restore indentation Undo and redo should not perform auto indentation. It should not change the indentation. Instead, it should restore previous indentation. * Rename ivar undoing(undoing or redoing) to restoring https://github.com/ruby/reline/commit/6355a6e0b2
2024-12-12[ruby/win32ole] Deprecate old constants in toplevelNobuyoshi Nakada
https://github.com/ruby/win32ole/commit/eaa1507262
2024-12-12[ruby/win32ole] [DOC] Hide old constants for the backward compatibility from ↵Nobuyoshi Nakada
RDoc https://github.com/ruby/win32ole/commit/99e1ea403f
2024-12-12[ruby/win32ole] [DOC] Fix a markup for codeNobuyoshi Nakada
https://github.com/ruby/win32ole/commit/542d39372c
2024-12-12increase diff.renameLimitNARUSE, Yui
2024-12-12Update default gems list at 911879e01f061c9ea2d3ca4eb6d73d [ci skip]git
2024-12-12[ruby/irb] Bump version to v1.14.2Stan Lo
(https://github.com/ruby/irb/pull/1045) https://github.com/ruby/irb/commit/dd31884657
2024-12-12[Feature #20884] News of toplevel "Ruby" name reservationNobuyoshi Nakada
2024-12-12[Feature #20884] Reserve "Ruby" toplevel nameNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12315