summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-28Update the depend filesMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7310
2023-02-28Merge internal/rgengc.h and internal/gc.hMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7310
2023-02-28YJIT: add defer_empty_count statMaxime Chevalier-Boisvert
Count how often we defer from a block that is empty Notes: Merged: https://github.com/ruby/ruby/pull/7396
2023-02-28[ruby/irb] Display and prioritise instance methods in `lsStan Lo
<module/class>` (https://github.com/ruby/irb/pull/496) https://github.com/ruby/irb/commit/e3d21f9329
2023-02-28[rubygems/rubygems] Fix method redefinition warning in gem exec specsSamuel Giddins
https://github.com/rubygems/rubygems/commit/f177990d4c
2023-02-28Implement Write Barrier for `autoload_data`Jean Boussier
It's not uncommon for libraries to add thing sinto autoload that won't necessarily be loaded. This can cause hundreds or thousands of entries to be left over in the autoload table, so it's best not to mark them on every minor. Notes: Merged: https://github.com/ruby/ruby/pull/7392
2023-02-28Update bundled gems list at 2023-02-28git
2023-02-28Update lib/net/http/status.rbHiroshi SHIBATA
2023-02-28Also ignore dismissed CodeQL alerts at tests and URI libraryHiroshi SHIBATA
2023-02-28Bump ruby/setup-ruby from 1.138.0 to 1.139.0dependabot[bot]
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.138.0 to 1.139.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Commits](https://github.com/ruby/setup-ruby/compare/d3c9825d67b0d8720afdfdde5af56c79fdb38d16...92aece5fc9c784ab66851c1e702b1bd5885a51f2) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/7400
2023-02-28[ruby/stringio] Implement write barrier on StringIOJean Boussier
It only has a single reference set in 3 places which makes it fairly easy to implement. https://github.com/ruby/stringio/commit/009896b973
2023-02-28Ignore rb/overly-large-range on URIHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7399
2023-02-28Enable only master branch for CodeQL push triggerHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7399
2023-02-28Run CodeQL each PRs againHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7399
2023-02-28Do not upload sarif file as artifactHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7398
2023-02-28Do not OSS scorecards check each pushHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7398
2023-02-28A file was missing in test/excludes for TestArraySubclasslukeg
Notes: Merged: https://github.com/ruby/ruby/pull/7385
2023-02-28Remove "unused parameter" warnings on include of ruby.hSébastien Helleu
These warnings are displayed when compiling with flag "-Wunused-parameter" (or with "-Wall -Wextra"). Notes: Merged: https://github.com/ruby/ruby/pull/7085
2023-02-28fix test/rubygems/test_gem_package_task.rb when in -j modelukeg
This test skipped sometimes due to failure to load 'rake/packagetask'. This is due to manipulation of $LOAD_PATH by other rubygems tests. If rake is loaded before any rubygems tests run, then it works fine. To reproduce the skipping behavior: $ make test-all TESTOPTS="-j6 --test-order=sorted test/rubygems/test_*.rb" Notes: Merged: https://github.com/ruby/ruby/pull/7394
2023-02-27Skip a spec failing on masterTakashi Kokubun
https://github.com/ruby/ruby/actions/runs/4286361460/jobs/7466545010 http://ci.rvm.jp/results/trunk_gcc9@ruby-sp2-docker/4462424 http://ci.rvm.jp/results/trunk_clang_13@ruby-sp2-docker/4462422
2023-02-27Update to ruby/spec@e7dc804Benoit Daloze
2023-02-27Update to ruby/mspec@dc2eb26Benoit Daloze
2023-02-27Remove intern/gc.h from Make depsMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7330
2023-02-27Update YJIT-bindgenMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7330
2023-02-27Merge internal/intern/gc.h into internal/gc.hMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7330
2023-02-27Fix spelling (#7389)John Bampton
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2023-02-27Revert "reuse open(2) from rb_file_load_ok on POSIX-like system"Takashi Kokubun
This reverts commit 35136e1e9c232ad7a03407b992b2e86b6df43f63. test-spec has been failing since this revision. .github/workflows/compilers.yml:82 https://github.com/ruby/ruby/actions/runs/4276884159/jobs/7445299562 ``` env: # Minimal flags to pass the check. default_cc: 'gcc-11 -fcf-protection -Wa,--generate-missing-build-notes=yes' optflags: '-O2' LDFLAGS: '-Wl,-z,now' # FIXME: Drop skipping options # https://bugs.ruby-lang.org/issues/18061 # https://sourceware.org/annobin/annobin.html/Test-pie.html TEST_ANNOCHECK_OPTS: "--skip-pie --skip-gaps" ``` Failure: ``` 1) An exception occurred during: Kernel#require (file extensions) does not load a C-extension file if a complex-extensioned .rb file is already loaded /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:317 Kernel#require (file extensions) does not load a C-extension file if a complex-extensioned .rb file is already loaded ERROR LeakError: Leaked file descriptor: 8 : #<File:/__w/ruby/ruby/src/spec/ruby/fixtures/code/load_fixture.ext.rb> /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:5:in `<top (required)>' 2) An exception occurred during: Kernel#require ($LOADED_FEATURES) stores an absolute path /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:330 Kernel#require ($LOADED_FEATURES) stores an absolute path ERROR LeakError: Closed file descriptor: 8 /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:5:in `<top (required)>' 3) An exception occurred during: Kernel#require ($LOADED_FEATURES) does not load a non-canonical path for a file already loaded /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:535 Kernel#require ($LOADED_FEATURES) does not load a non-canonical path for a file already loaded ERROR LeakError: Leaked file descriptor: 8 : #<File:/__w/ruby/ruby/src/spec/ruby/fixtures/code/load_fixture.rb> /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:5:in `<top (required)>' 4) An exception occurred during: Kernel#require ($LOADED_FEATURES) does not load a ../ relative path for a file already loaded /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:551 Kernel#require ($LOADED_FEATURES) does not load a ../ relative path for a file already loaded ERROR LeakError: Leaked file descriptor: 9 : #<File:../code/load_fixture.rb> /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:5:in `<top (required)>' 5) An exception occurred during: Kernel#require ($LOADED_FEATURES) complex, enumerator, rational, thread, ruby2_keywords are already required /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:563 Kernel#require ($LOADED_FEATURES) complex, enumerator, rational, thread, ruby2_keywords are already required ERROR LeakError: Closed file descriptor: 8 Closed file descriptor: 9 /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:5:in `<top (required)>' 6) An exception occurred during: Kernel.require (file extensions) does not load a C-extension file if a complex-extensioned .rb file is already loaded /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:317 Kernel.require (file extensions) does not load a C-extension file if a complex-extensioned .rb file is already loaded ERROR LeakError: Leaked file descriptor: 8 : #<File:/__w/ruby/ruby/src/spec/ruby/fixtures/code/load_fixture.ext.rb> /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:23:in `<top (required)>' 7) An exception occurred during: Kernel.require ($LOADED_FEATURES) stores an absolute path /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:330 Kernel.require ($LOADED_FEATURES) stores an absolute path ERROR LeakError: Closed file descriptor: 8 /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:23:in `<top (required)>' 8) An exception occurred during: Kernel.require ($LOADED_FEATURES) does not load a non-canonical path for a file already loaded /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:535 Kernel.require ($LOADED_FEATURES) does not load a non-canonical path for a file already loaded ERROR LeakError: Leaked file descriptor: 8 : #<File:/__w/ruby/ruby/src/spec/ruby/fixtures/code/load_fixture.rb> /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:23:in `<top (required)>' 9) An exception occurred during: Kernel.require ($LOADED_FEATURES) does not load a ../ relative path for a file already loaded /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:551 Kernel.require ($LOADED_FEATURES) does not load a ../ relative path for a file already loaded ERROR LeakError: Leaked file descriptor: 9 : #<File:../code/load_fixture.rb> /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:23:in `<top (required)>' 10) An exception occurred during: Kernel.require ($LOADED_FEATURES) complex, enumerator, rational, thread, ruby2_keywords are already required /__w/ruby/ruby/src/spec/ruby/core/kernel/shared/require.rb:563 Kernel.require ($LOADED_FEATURES) complex, enumerator, rational, thread, ruby2_keywords are already required ERROR LeakError: Closed file descriptor: 8 Closed file descriptor: 9 /__w/ruby/ruby/src/spec/ruby/core/kernel/require_spec.rb:23:in `<top (required)>' 11) An exception occurred during: Kernel#require_relative with a relative path (file extensions) does not load a C-extension file if a complex-extensioned .rb file is already loaded /__w/ruby/ruby/src/spec/ruby/core/kernel/require_relative_spec.rb:197 Kernel#require_relative with a relative path (file extensions) does not load a C-extension file if a complex-extensioned .rb file is already loaded ERROR LeakError: Leaked file descriptor: 8 : #<File:/__w/ruby/ruby/src/spec/ruby/fixtures/code/load_fixture.ext.rb> /__w/ruby/ruby/src/spec/ruby/core/kernel/require_relative_spec.rb:4:in `<top (required)>' 12) An exception occurred during: Kernel#require_relative with a relative path ($LOADED_FEATURES) stores an absolute path /__w/ruby/ruby/src/spec/ruby/core/kernel/require_relative_spec.rb:205 Kernel#require_relative with a relative path ($LOADED_FEATURES) stores an absolute path ERROR LeakError: Closed file descriptor: 8 /__w/ruby/ruby/src/spec/ruby/core/kernel/require_relative_spec.rb:4:in `<top (required)>' 13) An exception occurred during: Kernel#require_relative with an absolute path (file extensions) does not load a C-extension file if a complex-extensioned .rb file is already loaded /__w/ruby/ruby/src/spec/ruby/core/kernel/require_relative_spec.rb:399 Kernel#require_relative with an absolute path (file extensions) does not load a C-extension file if a complex-extensioned .rb file is already loaded ERROR LeakError: Leaked file descriptor: 8 : #<File:/__w/ruby/ruby/src/spec/ruby/fixtures/code/load_fixture.ext.rb> /__w/ruby/ruby/src/spec/ruby/core/kernel/require_relative_spec.rb:277:in `<top (required)>' 14) An exception occurred during: Kernel#require_relative with an absolute path ($LOAD_FEATURES) stores an absolute path /__w/ruby/ruby/src/spec/ruby/core/kernel/require_relative_spec.rb:407 Kernel#require_relative with an absolute path ($LOAD_FEATURES) stores an absolute path ERROR LeakError: Closed file descriptor: 8 /__w/ruby/ruby/src/spec/ruby/core/kernel/require_relative_spec.rb:277:in `<top (required)>' ```
2023-02-27YJIT: Detect and reject `send(:alias_for_send, :foo)`Alan Wu
Previously, YJIT failed to put the stack into the correct shape when `BasicObject#send` calls an alias method for the send method itself. This can manifest as strange `NoMethodError`s in the final non-send receiver, as [seen][1] with the kt-paperclip gem. I also found a case where it makes YJIT fail the stack size assertion while compiling `leave`. YJIT's `BasicObject#__send__` implementation already rejects sends to `send`, but didn't detect sends to aliases of `send`. Adjust the detection and reject these cases. Fixes [Bug #19464] [1]: https://github.com/Shopify/yjit/issues/306 Notes: Merged: https://github.com/ruby/ruby/pull/7377
2023-02-27YJIT: Reject __send__ with splat to cfunc for nowAlan Wu
`make test-spec` revealed this issue after applying an unrelated bug fix. A crashing case is included, though I suspect there are other scenarios where it misbehaves. Don't compile for now. Note that this is *not* an issue on the 3.2.x series; it has `send_args_splat_non_iseq` which already rejects all splats to cfuncs, including sends with splats. Notes: Merged: https://github.com/ruby/ruby/pull/7377
2023-02-27[ruby/irb] Add a comment about Rails' patch onStan Lo
Workspace#filter_backtrace (https://github.com/ruby/irb/pull/526) * Add a comment about Rails' patch on Workspace#filter_backtrace * Update lib/irb/workspace.rb Co-authored-by: Sorah Fukumori <sora134@gmail.com> --------- https://github.com/ruby/irb/commit/9443d911fc Co-authored-by: Sorah Fukumori <sora134@gmail.com>
2023-02-27[ruby/irb] Provide more useful message whenStan Lo
`IRB::Inspector#inspect_value` errors (https://github.com/ruby/irb/pull/511) **Before** ``` irb(main):001:0> c = Cat.new "foo" (Object doesn't support #inspect) => ``` **After** ``` irb(main):001:0> c = Cat.new "foo" An error occurred when inspecting the object: #<NoMethodError: undefined method `is_a?' for foo:Cat if obj.is_a?(String) ^^^^^^> Result of Kernel#inspect: #<Cat:0x0000000109090d80 @name="foo"> => ```
2023-02-27[ruby/reline] Fix wrong indent number in prompt. whole_lines hastomoya ishida
duplicated line. (https://github.com/ruby/reline/pull/460) * whole_lines should consider prev_line_index, and must not duplicate last_line * Add test for lines passed to dynamic prompt proc * Refactor whole_lines parameters used in test helper * Remove whole_line's arguments
2023-02-27[StepSecurity] ci: Harden GitHub ActionsStepSecurity Bot
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Notes: Merged: https://github.com/ruby/ruby/pull/7390
2023-02-27Ignore test case for Kernel and IO methodsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Prefer to use File.foreach instead of IO.foreachHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Prefer to use File.binwrite instead of IO.binwriteHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Prefer to use File.binread instead of IO.binreadHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Prefer to use File.readlines instead of IO.readlinesHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7387
2023-02-27Rename job and workflow namesHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7388
2023-02-27Use matrix strategies each languageHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7388
2023-02-27Merge codeql-config into codeql-analysisHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7388
2023-02-27[ruby/reline] Fix the cause of test_yamatanooroti randomly failingtomoya ishida
(https://github.com/ruby/reline/pull/474) * Add repeated input-delete test that fails on HEAD * Use raw mode while readmultiline
2023-02-27Update bundled gems list at 2023-02-27git
2023-02-27Bump github/codeql-action from 2.2.4 to 2.2.5dependabot[bot]
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.4 to 2.2.5. - [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/17573ee1cc1b9d061760f3a006fc4aac4f944fd5...32dc499307d133bb5085bae78498c0ac2cf762d5) --- 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/7386
2023-02-27[ruby/tempfile] Fix inconsistency in doc of Tempfile.createSven Schwyn
https://github.com/ruby/tempfile/commit/3f96b2ed29
2023-02-27Add all-ruby-quine as a sample codeYusuke Endoh
This sample code works on all release versions of Ruby, from Ruby 0.49. Notes: Merged: https://github.com/ruby/ruby/pull/7380
2023-02-27Symbol#end_with? accepts Strings onlyAdam Daniels
Regular expressions are not supported (same as String#end_with?). Notes: Merged: https://github.com/ruby/ruby/pull/7384
2023-02-26reuse open(2) from rb_file_load_ok on POSIX-like systemEric Wong
When loading Ruby source files, we can save the result of successful opens as open(2)/openat(2) are a fairly expensive syscalls. This also avoids a time-of-check-to-time-of-use (TOCTTOU) problem. This reduces open(2) syscalls during `require'; but should be most apparent when users have a small $LOAD_PATH. Users with large $LOAD_PATH will benefit less since there'll be more open(2) failures due to ENOENT. With `strace -c -e openat ruby -e exit' under Linux, this results in a ~14% reduction of openat(2) syscalls (glibc uses openat(2) to implement open(2)). % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 0.00 0.000000 0 296 110 openat 0.00 0.000000 0 254 110 openat Additionally, the introduction of `struct ruby_file_load_state' may make future optimizations more apparent. This change cannot benefit binary (.so) loading since the dlopen(3) API requires a filename and I'm not aware of an alternative that takes a pre-existing FD. In typical situations, Ruby source files outnumber the mount of .so files.
2023-02-26[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTPBurdette Lamar
(https://github.com/ruby/net-http/pull/127) https://github.com/ruby/net-http/commit/07b2b88ef5
2023-02-26Fix autoconf RUBY_STACK_GROW_DIRECTION on ARM devicesBen Hamilton
Notes: Merged: https://github.com/ruby/ruby/pull/7373