Граф коммитов

88134 Коммитов

Автор SHA1 Сообщение Дата
S-H-GAMELINKS 5c1e43277e Remove rb_ary_new for parser
rb_ary_new function was not used by the parser and could be removed.
2024-10-25 22:32:38 +09:00
S.H. d278d352f9
Introduce inline_primary rule
Introduce inline_primary rule to merge the same BNF pattern
2024-10-25 22:26:29 +09:00
Daisuke Fujimura (fd0) 9c8c140d73 Avoid dangling pointer on cygwin 2024-10-25 20:52:32 +09:00
tomoya ishida f1e923631c [ruby/reline] Add completion_append_character test
(https://github.com/ruby/reline/pull/773)

https://github.com/ruby/reline/commit/5f5a0aa78c
2024-10-25 07:39:42 +00:00
Nobuyoshi Nakada 10e0ebc7c2 [ruby/rdoc] Remove details markers in HTML documents
`summary {list-style: none;}` still does not work in Safari 18.

https://github.com/ruby/rdoc/commit/c6a0a6a0d5
2024-10-25 07:12:07 +00:00
Nobuyoshi Nakada 0d7f746097 .travis.yml: Skip document only commit and merge for bot
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-10-25 07:05:56 +02:00
Jun Aruga d089826c0d .travis.yml: Drop arm32-linux case.
In the Arm64 Ubuntu jammy (22.04) instance in Travis, we saw the following
error related to the `setarch` failing to run on the 32-bits architecture,
though the linux32 was included in the output of the `setarch --list`.

https://app.travis-ci.com/github/junaruga/ruby/builds/272876565#L698
```
$ setarch --list
uname26
linux32
linux64
armv7l
armv8l
armh
arm
arm64
aarch64

$ setarch linux32 --verbose --32bit uname -a
Switching on ADDR_LIMIT_32BIT.
The command "setarch linux32 --verbose --32bit uname -a" failed and exited with 1 during .
```

As we already have the i686 case to test the 32-bits on GitHub, we decided
dropping the arm32-linux case on Travis CI.
2024-10-25 07:05:56 +02:00
Nobuyoshi Nakada e6ddbf181d [Misc #20810] Reenable Travis CI.
There was a report that the Travis CI's long-term infra issue was addressed by
the Travis team on the Ruby Bug ticket 20810.

We especially want to test the s390x (big-endian case) on the pull-request.

Revert ".travis.yml: Drop all the pipelines due to jobs not starting."

This reverts commit c853e48fc1.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-10-25 07:05:56 +02:00
BurdetteLamar 2b98545646 [DOC] Tweaks for Array#union 2024-10-24 17:25:04 -04:00
BurdetteLamar 2078ba1984 [DOC] Tweaks for Array#transpose 2024-10-24 17:23:22 -04:00
tomoya ishida 979e447d7e [ruby/reline] nonprinting_start and nonprinting_end should be
removed
(https://github.com/ruby/reline/pull/771)

https://github.com/ruby/reline/commit/e36441652a
2024-10-24 16:36:39 +00:00
Matt Valentine-House 1634280e1c Fix shared GC with -DRUBY_DEBUG
RUBY_DEBUG enables ractor assertions, which sets up some space at the
end of each RVALUE to store the associated ractor ID. We need to make
sure the function that does this is visible to shared GC libraries.
2024-10-24 16:08:46 +01:00
Matt Valentine-House 84ec06533d Fix shared-gc build task
include CPPFLAGS, and the correct CFLAGS
2024-10-24 16:08:46 +01:00
Wu 78378cae66 append completion_append_character only when continous completion is … (#764)
* append completion_append_character only when continous completion is not possible

* refactoring

* remove debug puts
2024-10-24 14:12:41 +00:00
Peter Zhu c1ca331cf4 Fix potential issue in wmap_cmp for dead entries
wmap_cmp will always return true for dead entries since dead entries have
a Qundef value. When the keys have a hash collision, this may cause the
wrong entry to be returned.

This commit changes wmap_cmp to compare by weakmap_entry pointers when
the entry is dead.
2024-10-24 09:45:29 -04:00
Nobuyoshi Nakada 4755d28f9b [ruby/zlib] Reduce `ensure` nesting
https://github.com/ruby/zlib/commit/5a02eac37f
2024-10-24 10:30:37 +00:00
Nobuyoshi Nakada ae67325dd0 [ruby/zlib] Tell gcc-14 that `Qnil` is not passed to `gzfile_calc_crc`
Suppress false positive warnings due to a bug in gcc-14 optimizer.

https://github.com/ruby/zlib/commit/eb1cf426c2
2024-10-24 10:18:49 +00:00
dependabot[bot] 4df0038d5e Bump actions/checkout in /.github/actions/setup/directories
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](eef61447b9...11bd71901b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-24 11:47:18 +09:00
Ellen Marie Dash a24cb8ac43 [rubygems/rubygems] [SpecFetcher tests] Use >3 character long fake gem name.
https://github.com/rubygems/rubygems/commit/ce06b8f0d9
2024-10-24 00:55:31 +00:00
Ellen Marie Dash 5549dd2c12 [rubygems/rubygems] [SpecFetcher] Change < to <= like it should be.
https://github.com/rubygems/rubygems/commit/3d5135e69b
2024-10-24 00:55:30 +00:00
Guilherme Carreiro 0b3d518e81 [ruby/error_highlight] Rename the `ErrorHighlight::DefaultFormatter` setting to `max_snippet_width` for clarity
https://github.com/ruby/error_highlight/commit/e13cbd4335
2024-10-24 00:29:20 +00:00
Stan Lo 60c0c324b2 [ruby/rdoc] Red-based darkfish color scheme
(https://github.com/ruby/rdoc/pull/1191)

* Cleanup rdoc.css

* Use red as the highlight color

* Use the same red as ruby-lang.org

* Make main section links stand out more

* Remove scrollbar styling

https://github.com/ruby/rdoc/commit/f69dc470ac
2024-10-23 22:36:27 +00:00
Ellen Marie Dash 60d8435418 [rubygems/rubygems] [SpecFetcher] Avoid unneeded string allocation.
https://github.com/rubygems/rubygems/commit/1024505d8e
2024-10-23 20:03:15 +00:00
Ellen Marie Dash ab7c800ea8 [rubygems/rubygems] [SpecFetcher] Bail before calling available_specs()
https://github.com/rubygems/rubygems/commit/0719921af4
2024-10-23 20:03:15 +00:00
Ellen Marie Dash 0f5941a5dd [rubygems/rubygems] Replace .map{...}.compact with .filter_map {...}
https://github.com/rubygems/rubygems/commit/18c4ea7d00
2024-10-23 20:03:15 +00:00
Ellen Marie Dash 65fd8606a9 [rubygems/rubygems] Add another bail-early condition to suggest_gems_from_name(), with test.
https://github.com/rubygems/rubygems/commit/7bb7c0ac2d
2024-10-23 20:03:14 +00:00
Ellen Marie Dash ff749d9956 [rubygems/rubygems] Optimize when suggest_gems_from_name finds an exact match.
https://github.com/rubygems/rubygems/commit/6c67298584
2024-10-23 20:03:14 +00:00
Ellen Marie Dash fe66eee1a0 [rubygems/rubygems] Document suggest_gems_from_name()
https://github.com/rubygems/rubygems/commit/8f9983cc21
2024-10-23 20:03:13 +00:00
Ellen Marie Dash 35f0b7c83f [rubygems/rubygems] [suggest_gems_from_name] Bail early if the value is guaranteed to be rejected.
https://github.com/rubygems/rubygems/commit/56262a9384
2024-10-23 20:03:13 +00:00
Peter Zhu 5460d5b119 Move error handling for GC.stat_heap to gc.c 2024-10-23 13:18:09 -04:00
Peter Zhu d3aaca9785 Make rb_gc_impl_stat_heap return a VALUE instead of size_t 2024-10-23 13:18:09 -04:00
Peter Zhu c0b50d05c7 Move error handling for GC.stat to gc.c 2024-10-23 13:18:09 -04:00
Peter Zhu 9dea0fae25 Make rb_gc_impl_stat return a VALUE instead of size_t 2024-10-23 13:18:09 -04:00
Peter Zhu c2af84b244 Move error handling for GC.latest_gc_info to gc.c 2024-10-23 13:18:09 -04:00
Alan Wu 8e509380a2 YJIT: Make PendingBranch::set_target `must_use` [ci skip] 2024-10-23 10:20:44 -04:00
Alan Wu cb661d7d82
YJIT: Check when gen_branch() fails
We got some core dumps in the wild where a PendingBranch had everything
as None, leading to a panic unwrapping in PendingBranch::into_branch().
This happened while compiling a `branchif`.

It seems that the only way this can happen is when core::gen_branch()
fails, but not due to OOM. We wouldn't have reach into_branch() when
OOM, and the only way to not leave markers that would've set the
branch's start_addr to some value in gen_branch() is for set_target() to
fail, causing an early return.

Unfortunately, it's hard to tell the exact sequence of events that led
to this situation, but regardless, the dumps show us that we should
check for errors in gen_branch().

Because gen_branch() is used deep in the stack during compilation (e.g.
guard_known_class() -> jit_chain_guard() -> gen_branch()), it'd be bad
for compile speed to propagate the error everywhere, not to mention the
massive patch required. Opt for a flag checked near the end of
compilation.
2024-10-23 10:17:08 -04:00
Jean Boussier a6c4a842db Harden the ObjectSpace.memsize_of spec
[Bug #20803]

`abc` is used a lot across the ruby spec suite, if another test runs before
this spec is loaded and create this symbol dynamically (`"abc".to_sym`)
the spec will fail.

So it's preferable to use a symbol name that is very unlikely to be
used elsewhere to avoid flakes.
2024-10-23 16:04:28 +02:00
Nobuyoshi Nakada 681313872f CI: Test with gcc-14 on macOS 2024-10-23 23:02:15 +09:00
Nobuyoshi Nakada baae365709 Extract common code as a function 2024-10-23 23:02:15 +09:00
Nobuyoshi Nakada 7d1011d3fa Fix false warning by gcc 14 for aarch64
gcc 14 for aarch64 with `-O3` may emit a false positive warning for a
pointer access of `RB_BUILTIN_TYPE` called from `RB_TYPE_P`.  `Qfalse`
shouldn't get there because of `RB_SPECIAL_CONST_P`, but the optimizer
seems to ignore this condition in some cases (`ASSUME` just before the
access doesn't seem to have any effect either).  Only by reversing the
order in `RB_SPECIAL_CONST_P` to compare with 0 first does the warning
seem to go away.
2024-10-23 23:02:15 +09:00
Nobuyoshi Nakada 47f6ba349f Check if -pipe option works
With `-pipe` option, gcc of Homebrew on macOS results in a mysterious
error.

```
$ command -v gcc-14
/opt/homebrew/bin/gcc-14

$ gcc-14 --version
gcc-14 (Homebrew GCC 14.2.0) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc-14 -c -pipe conftest.c
clang: error: no input files
```
2024-10-23 23:02:15 +09:00
Alan Wu 1e59fa2bae YJIT: Count compiled_branch_count when branch is finalized [ci skip] 2024-10-23 09:53:44 -04:00
David Rodríguez 438d36eb4b [rubygems/rubygems] Print a proper error when there's a previous empty installation path with bad permissions
https://github.com/rubygems/rubygems/commit/07e7f0bf5e
2024-10-23 11:16:53 +00:00
David Rodríguez f2380081df [rubygems/rubygems] Improve Bundler errors when trying to install to a protected folder in macOS
### Before

```
$ GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/ bundle
Fetching gem metadata from https://rubygems.org/.
Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=sqlite3 version=1.3.13 platform=ruby> because it is missing extensions
Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=nokogiri version=1.13.8 platform=ruby> because it is missing extensions
Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=libxml-ruby version=3.2.1 platform=ruby> because it is missing extensions
Resolving dependencies...
Fetching ruby2_keywords 0.0.5

Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`.
The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem

Retrying download gem from https://rubygems.org/ due to error (3/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`.
The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem

Retrying download gem from https://rubygems.org/ due to error (4/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`.
The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem

Bundler::GenericSystemCallError: There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`.
The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/shared_helpers.rb:119:in `rescue in filesystem_access'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/shared_helpers.rb:104:in `filesystem_access'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/rubygems_integration.rb:431:in `block in download_gem'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/retry.rb:40:in `run'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/retry.rb:30:in `attempt'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/rubygems_integration.rb:423:in `download_gem'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:479:in `download_gem'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:436:in `fetch_gem'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:420:in `fetch_gem_if_possible'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:162:in `install'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/gem_installer.rb:55:in `install'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/gem_installer.rb:17:in `install_from_spec'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/parallel_installer.rb:133:in `do_install'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/parallel_installer.rb:124:in `block in worker_pool'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:62:in `apply_func'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:57:in `block in process_queue'
  <internal:kernel>:187:in `loop'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:54:in `process_queue'
  /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'

An error occurred while installing ruby2_keywords (0.0.5), and Bundler cannot continue.

In Gemfile:
  ruby2_keywords
```

### After

```
$ GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/ bundle
There was an error creating `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/bundler.lock`.
The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/bundler.lock
```

https://github.com/rubygems/rubygems/commit/345ec45f5a
2024-10-23 08:53:19 +00:00
David Rodríguez 055ed5f592 [rubygems/rubygems] Improve `Bundler::GenericSystemCall` error message
https://github.com/rubygems/rubygems/commit/ccd7e084a8
2024-10-23 08:53:18 +00:00
David Rodríguez cc29d737ef [rubygems/rubygems] Consistently use `:create` action when creating directories
It gives better errors.

https://github.com/rubygems/rubygems/commit/bedae080ef
2024-10-23 08:53:18 +00:00
David Rodríguez 88b969cd19 [rubygems/rubygems] Fix out of date spec description
https://github.com/rubygems/rubygems/commit/71fd896041
2024-10-23 08:53:17 +00:00
David Rodríguez b843d4ee14 [rubygems/rubygems] Fix running `bundler` (with a final `r`) in a `bundle exec` context
https://github.com/rubygems/rubygems/commit/ad95a1dfaa
2024-10-23 08:52:46 +00:00
David Rodríguez 4790ecc86f [rubygems/rubygems] Do what the comment says, it's simpler
https://github.com/rubygems/rubygems/commit/0511d2c08d
2024-10-23 08:52:45 +00:00
David Rodríguez ffd51926bf [rubygems/rubygems] Remove the need for some bundler monkeypatches
https://github.com/rubygems/rubygems/commit/f530f8686d
2024-10-23 08:52:45 +00:00