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

2609 Коммитов

Автор SHA1 Сообщение Дата
Kevin Newton d5d2c6ea33 [PRISM] Enable passing Symbol specs 2024-05-01 15:36:15 -04:00
Kevin Newton febad5cbda Skip Warning.[] spec if mspec is passing warning options 2024-05-01 14:49:45 -04:00
Kevin Newton 1b8650964b [PRISM] Support interpolated regexp with encoding modifiers 2024-05-01 12:34:29 -04:00
David Rodriguez 435f449b4e [rubygems/rubygems] Make sure to force latest resolvable version explicitly
To make sure we can always update to the latest resolvable version for
each gem explicitly requested for update, we first run a full update,
and then add explicit exact requirements to the resolved versions. This
may lead into conflicts, but our resolver already automatically parses
those and unlocks additional gems to fix them.

https://github.com/rubygems/rubygems/commit/01c0bf34f0
2024-04-29 10:29:29 +00:00
David Rodríguez 53571de8e9 [rubygems/rubygems] Fix circular require warning
https://github.com/rubygems/rubygems/commit/241d0aafcd
2024-04-29 09:04:33 +00:00
David Rodríguez d6cb62a88f [rubygems/rubygems] Show better error when installed gemspecs are unreadable
https://github.com/rubygems/rubygems/commit/924f87c8a9
2024-04-29 08:57:35 +00:00
David Rodríguez 68a1867f53 [rubygems/rubygems] Fix issue with `bundle update` with an out of sync lockfile
An old platform related bug fix made some existing lockfiles no longer
work because they included invalid platforms. So to make it backwards
compatible, code was added to remove invalid platforms from the lockfile
before resolution. This is skipped though when Gemfile has changed
dependencies because in that case we will be re-resolving anyways.
However, in the `bundle update` case, the detection of "dependencies
have changed" was not actually working making Bundler remove all
platforms and not be able to resolve.

https://github.com/rubygems/rubygems/commit/6452adfd62
2024-04-29 08:56:55 +00:00
Kevin Newton 46480e3042 [PRISM] Use redundant return flag 2024-04-26 15:16:58 -04:00
Kevin Newton 94d6295b2d [PRISM] Enable coverage in eval ISEQs 2024-04-26 12:25:45 -04:00
Kevin Newton 49764869af [PRISM] Enable coverage in top and main iseqs 2024-04-26 12:25:45 -04:00
Kevin Newton af24ba4034 [PRISM] Raise LoadError when file cannot be read 2024-04-25 14:59:48 -04:00
Josh Nichols 6f4f360fc4 [rubygems/rubygems] Add auto_install support to require "bundler/setup"
We have some places that already use `bundle config auto_install true`,
ie:

7a144f3374/bundler/lib/bundler/cli.rb (L11)

This applies the same logic (copy and pasted) to happen when you
`require "bundler/setup"`.

https://github.com/rubygems/rubygems/commit/bb3c922341
2024-04-25 18:46:05 +00:00
Kevin Newton b50e1e68b6 [PRISM] Enable more passing tests 2024-04-25 08:14:56 -04:00
David Rodriguez 5d2fb5d76b [rubygems/rubygems] Don't upcase Windows ENV when backing it up
I apparently did that to fix some issue with case insensitivity but I
didn't add a spec, and I think not upcasing should not cause issues.

https://github.com/rubygems/rubygems/commit/1b6f23275a
2024-04-25 10:35:47 +00:00
David Rodríguez 5577f138b4 [rubygems/rubygems] Properly resolve aliases when `bundle help` is run
https://github.com/rubygems/rubygems/commit/5d9bf03c59
2024-04-25 10:35:02 +00:00
Hiroshi SHIBATA a95b46db06 [rubygems/rubygems] Track HEAD changes for old PR proposal
https://github.com/rubygems/rubygems/commit/e3d180620c
2024-04-19 05:18:21 +00:00
fatkodima 09cbbe0e3d [rubygems/rubygems] Add plugin hooks for Bundler.require
https://github.com/rubygems/rubygems/commit/b373b7ed0d
2024-04-19 05:18:20 +00:00
careworry 8e08556fa7
chore: remove repetitive words (#10573)
Signed-off-by: careworry <worrycare@outlook.com>
2024-04-18 15:32:34 +00:00
Jean Boussier 3a7846b1aa Add a hint of `ASCII-8BIT` being `BINARY`
[Feature #18576]

Since outright renaming `ASCII-8BIT` is deemed to backward incompatible,
the next best thing would be to only change its `#inspect`, particularly
in exception messages.
2024-04-18 10:17:26 +02:00
David Rodriguez bc652d7568
[rubygems/rubygems] Never write credentials to lockfiles
https://github.com/rubygems/rubygems/commit/e8a363713e
2024-04-18 11:07:09 +09:00
Mike Dalessio 98c84ef42c [rubygems/rubygems] Excluding local platform from lockfile should not affect musl vs gnu case
This case is for not locking things like `arm-darwin-23` when the
lockfile already includes `arm-darwin`, so that we don't infinitely keep
redundant versioned platforms in the lockfile when not necessary.

We detect this with `Gem::Platform#===`. For example,
`Gem::Platform.new("arm-darwin-23") === Gem::Platform.new("arm-darwin")`
but they're not `==`.

However, in the case of `-musl` vs `-gnu`, those act as the platform
"version", but `===` is not commutative for them. This is explained in
`===` docs.

We only want to exclude the local platform in situations when
`Gem::Platform#===` is actually commutative.

https://github.com/rubygems/rubygems/commit/8099c4face
2024-04-17 18:17:12 +00:00
Samuel Williams 6ade36c06b
`Fiber#raise` recursively raises on nested resuming_fiber. (#10482)
* Improve consistency of `Fiber.current.raise`.
2024-04-17 23:08:47 +12:00
Nobuyoshi Nakada 55b68d6cdc
Revert an accidentally merged change [ci skip] 2024-04-17 19:16:00 +09:00
Nobuyoshi Nakada 09638741ba [Feature #20335] `Thread.each_caller_location` arguments
Accecpt the same arguments as `caller` and `caller_locations`.
2024-04-17 18:47:07 +09:00
Kevin Newton 650b5e5aa2 [PRISM] Enable more passing tests 2024-04-12 17:46:31 -04:00
Kevin Newton 3629d4df66 [PRISM] Enable passing tests for prism 2024-04-12 11:07:04 -04:00
David Marshall a64a42ae38 [rubygems/rubygems] `bundle add --glob` continued- quote glob value invocation in specs, add banner text for CLI recommending single quotes
https://github.com/rubygems/rubygems/commit/6d2cf955f9
2024-04-12 13:31:43 +00:00
David Marshall c4b5f3f142 [rubygems/rubygems] bundler CLI option for add gem --glob=
Bundler online documentation says that if the gem is located within a subdirectory of a git repository,
you can use the `:glob` option to specify the location of its .gemspec

`gem 'cf-copilot', git: 'https://github.com/cloudfoundry/copilot', glob: 'sdk/ruby/*.gemspec'`

This change allows for equivalent functionality from the bundler CLI

`bundle add cf-copilot --git=https://github.com/cloudfoundry/copilot --glob=sdk/ruby/*.gemspec`

https://github.com/rubygems/rubygems/commit/91052e5868
2024-04-12 13:31:43 +00:00
Kevin Newton 842f151d79 [PRISM] Enable more passing tests 2024-04-11 15:47:30 -04:00
Cody Cutrer c5e661b1d7 [rubygems/rubygems] Fix installing plugins via relative paths
This affected both CLI and Gemfile installs

https://github.com/rubygems/rubygems/commit/a0d101a8df
2024-04-11 19:35:28 +00:00
Kevin Newton 58f93eec18 [PRISM] Fix break in super block 2024-04-11 14:39:04 -04:00
Jean Boussier 9183101aa7 prism_compile.c: X_STRING should be frozen
The backtick method recieves a frozen string unless it is interpolated.

Otherwise the string held in the ISeq could be mutated by a custom
backtick method.
2024-04-11 08:08:30 -04:00
Kouhei Yanagita 9f6deaa688 [Misc #18984] Raise TypeError from Range#size if the range is not iterable 2024-04-10 07:28:07 -07:00
Hiroshi SHIBATA 16c5e34c74 Use rake-13.2.1 2024-04-05 17:36:16 +09:00
David Rodriguez 58d03c3458 [rubygems/rubygems] Fix crash with development bundler binstub
Fixes the following error:

````
$ ruby /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb clean --force
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
TypeError: no implicit conversion of Pathname into String
  /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:167:in `match'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:167:in `block in clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:164:in `each'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:164:in `clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli/clean.rb:13:in `run'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:590:in `clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:34:in `dispatch'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:28:in `start'
          /home/deivid/code/rubygems/rubygems/bundler/exe/bundle:28:in `block in <top (required)>'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
          /home/deivid/code/rubygems/rubygems/bundler/exe/bundle:20:in `<top (required)>'
          /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb:5:in `load'
          /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb:5:in `<main>'

```
(...)
````

https://github.com/rubygems/rubygems/commit/ff7ce7eb6d
2024-04-05 09:34:51 +09:00
Nobuyoshi Nakada ce395d7e90
Reset `$.` before matching
This is a global variable and may happen to be set to 4 elsewhere.

http://ci.rvm.jp/logfiles/brlog.trunk.20240403-054356#L1707
```
The if expression with a boolean range ('flip-flop' operator) warns when Integer literals are used instead of predicates FAILED
Expected [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] == []
to be truthy but was false
```
2024-04-03 07:38:52 +00:00
Andrew Konchin 1e5949bd60 Update to ruby/spec@573cf97 2024-04-02 10:50:30 +02:00
Hiroshi SHIBATA a65d49ce77 Use Rake 13.2.0 2024-04-02 11:22:14 +09:00
Kevin Newton cc6668c656 [PRISM] Enable passing pattern matching tests 2024-04-01 15:08:50 -04:00
David Rodriguez e2a1d0b53d [rubygems/rubygems] Improve error message when strict resolution filters out everything
https://github.com/rubygems/rubygems/commit/1ea44b3749
2024-04-01 15:03:28 +00:00
David Rodriguez d69ef1cc52 [rubygems/rubygems] Let GemVersionPromoter sort in preferred order directly
So that we don't need to reverse the Array.

https://github.com/rubygems/rubygems/commit/aeea5e2e00
2024-04-01 15:03:25 +00:00
David Rodriguez 0a1e36964d [rubygems/rubygems] Remove unnecessary filtering
We do that when first caching versions, and then it's no longer
necessary.

https://github.com/rubygems/rubygems/commit/ede15847db
2024-04-01 15:03:25 +00:00
Alex Robbin d7d59ea172 [rubygems/rubygems] add test case to ensure updating with multiple sources + caching maintains the right lockfile
https://github.com/rubygems/rubygems/commit/65839757e6
2024-03-29 19:27:28 +00:00
Kevin Newton 8191735b73 [PRISM] Fix BEGIN{} execution order 2024-03-29 08:51:04 -04:00
Kevin Newton a8f902ea8e [PRISM] Add debug info for frozen strings 2024-03-28 15:17:29 -04:00
Kevin Newton 3e9c684236 [PRISM] Allow space before encoding comment 2024-03-28 13:02:06 -04:00
Kevin Newton f7c5e11d89 [PRISM] Use new -x prism API 2024-03-28 12:04:35 -04:00
Nobuyoshi Nakada 4fa8fefd9c
Suppress warning at literal string 2024-03-28 23:19:39 +09:00
Hiroshi SHIBATA 7630a89a4b Use www.rfc-editor.org for RFC text.
We use the following site for that now:

* https://tools.ietf.org/ or http
* https://datatracker.ietf.org or http

Today, IETF said the official site of RFC is www.rfc-editor.org.

FYI: https://authors.ietf.org/en/references-in-rfcxml

I replaced them to www.rfc-editor.org.
2024-03-28 11:44:45 +09:00
Kevin Newton eb995a6410 [PRISM] Include file and line in error message 2024-03-27 14:19:58 -04:00
Kevin Newton 42d1cd8f7f [PRISM] Pass --enable-frozen-string-literal through to evals 2024-03-27 08:34:42 -04:00
Kevin Newton a1ae29e87d [PRISM] Enable other passing specs 2024-03-27 08:34:42 -04:00
Cody Cutrer 44b5c912da [rubygems/rubygems] Allow installing plugins from path via CLI
Also bring the man page up to date.

https://github.com/rubygems/rubygems/commit/a849bd6947
2024-03-27 11:34:46 +00:00
crazeteam b2b665eba5 [DOC] remove repetitive words in comments
Signed-off-by: crazeteam <lilujing@outlook.com>
2024-03-27 07:52:18 +09:00
Cody Cutrer 552647175e [rubygems/rubygems] Improve validation of `bundle plugin install` options
Ensure only one source type is specified, and ensure options that
are only relevant to git sources are only specified with git.

https://github.com/rubygems/rubygems/commit/58b043215e
2024-03-25 14:25:46 +00:00
David Rodriguez 7b3ef370f8 [rubygems/rubygems] Fix incorrect `bundle update --bundler` message
https://github.com/rubygems/rubygems/commit/146de56353
2024-03-22 13:14:42 +00:00
Benoit Daloze 74995a1a77 [Feature #20275] Remove extra backtrace entries for rescue and ensure 2024-03-22 12:30:15 +01:00
Kevin Newton 0e8b6c62a4 [PRISM] Enable specs in CI 2024-03-20 14:28:13 -04:00
Étienne Barrié 12be40ae6b Implement chilled strings
[Feature #20205]

As a path toward enabling frozen string literals by default in the future,
this commit introduce "chilled strings". From a user perspective chilled
strings pretend to be frozen, but on the first attempt to mutate them,
they lose their frozen status and emit a warning rather than to raise a
`FrozenError`.

Implementation wise, `rb_compile_option_struct.frozen_string_literal` is
no longer a boolean but a tri-state of `enabled/disabled/unset`.

When code is compiled with frozen string literals neither explictly enabled
or disabled, string literals are compiled with a new `putchilledstring`
instruction. This instruction is identical to `putstring` except it marks
the String with the `STR_CHILLED (FL_USER3)` and `FL_FREEZE` flags.

Chilled strings have the `FL_FREEZE` flag as to minimize the need to check
for chilled strings across the codebase, and to improve compatibility with
C extensions.

Notes:
  - `String#freeze`: clears the chilled flag.
  - `String#-@`: acts as if the string was mutable.
  - `String#+@`: acts as if the string was mutable.
  - `String#clone`: copies the chilled flag.

Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2024-03-19 09:26:49 +01:00
Cody Cutrer cb029fa4e8 [rubygems/rubygems] Deprecate `bundle plugin install --local-git=`
It's the exact same implementation as --git

https://github.com/rubygems/rubygems/commit/18eb2418c6
2024-03-18 11:42:37 +00:00
Jean Boussier 8a8df49174 Update set_backtrace documentation
Followup: https://github.com/ruby/ruby/pull/10017

[Feature #13557]
2024-03-18 08:55:46 +01:00
David Rodriguez dc06375c4f [rubygems/rubygems] Ignore commented out keys in config file
https://github.com/rubygems/rubygems/commit/c4a8d2a930
2024-03-17 22:55:16 +00:00
Nobuyoshi Nakada d4a53b465a
Prefer the simple read/write `File` singleton methods 2024-03-16 23:29:06 +09:00
Benoit Daloze ed2f685253 Update to ruby/spec@89175b2 2024-03-14 21:44:53 +01:00
Benoit Daloze 1d9f99144b Update to ruby/mspec@b8f8f4e 2024-03-14 21:44:52 +01:00
Peter Zhu ff51dc5654 [Feature #20265] Remove rb_newobj_of and RB_NEWOBJ_OF 2024-03-14 12:53:04 -04:00
Jean Boussier 315bde5a0f `Exception#set_backtrace` accept arrays of `Backtrace::Location`
[Feature #13557]

Setting the backtrace with an array of strings is lossy. The resulting
exception will return nil on `#backtrace_locations`.

By accepting an array of `Backtrace::Location` instance, we can rebuild
a `Backtrace` instance and have a fully functioning Exception.

Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2024-03-14 11:38:40 +01:00
Jean Boussier a5c5f83b24 Make `const_source_location` return the real constant as soon as defined
[Bug #20188]

Ref: https://github.com/fxn/zeitwerk/issues/281#issuecomment-1893228355

Previously, it would only return the real constant location once the
autoload was fully completed.
2024-03-13 09:39:09 +01:00
Hiroshi SHIBATA 2bc4575ac0 Removed unused fixtures at time examples 2024-03-07 10:05:53 +09:00
Nobuyoshi Nakada 29d3d13a1f
Run `binding.irb` in cleaner environment and clean the history file 2024-03-06 20:44:09 +09:00
Hiroshi SHIBATA 51965399df Use include instead of equal assertion.
irb will load multiple rc files now. If developer have their rcfile on
home directory or etc, equal assertion will fail with custom prompt.
2024-03-06 10:38:25 +09:00
cui fliter 226a889dc7
[DOC] fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-03-05 18:50:47 +09:00
Nobuyoshi Nakada b582e5a6e9 [rubygems/rubygems] Clear generated files recursively
On macOS, `dsymutil` utility splits debug info into .dSYM directory.
Glob list of `.bundle/cache/extensions/**/*binary_c*` includes that
directory but `FileUtils.rm` fails to unlink a directory.

https://github.com/ruby/ruby/actions/runs/8149918901/job/22275331688#step:11:3000
```
       Operation not permitted @ apply2files - /Users/runner/work/ruby/ruby/src/tmp/2/home/.bundle/cache/extensions/arm64-darwin-22/ruby/3.4.0+0/3b02a1011c53518f911ab3a9e8c6c608/very_simple_binary-1.0/very_simple_binary_c.bundle.dSYM
     # ./lib/fileutils.rb:2332:in 'File.unlink'
     # ./lib/fileutils.rb:2332:in 'block in FileUtils::Entry_#remove_file'
     # ./lib/fileutils.rb:2337:in 'FileUtils::Entry_#platform_support'
     # ./lib/fileutils.rb:2331:in 'FileUtils::Entry_#remove_file'
     # ./lib/fileutils.rb:1475:in 'FileUtils.remove_file'
     # ./lib/fileutils.rb:1223:in 'block in FileUtils.rm'
     # ./lib/fileutils.rb:1222:in 'FileUtils.rm'
     # ./spec/bundler/install/global_cache_spec.rb:235:in 'block (3 levels) in <top (required)>'
```

https://github.com/rubygems/rubygems/commit/375c127684
2024-03-05 07:13:39 +00:00
Yuta Saito ef5af32799 [rubygems/rubygems] Clear `RUBY_CODESIGN` env var while running tests
The `RUBY_CODESIGN` environment variable is used by mkmf-generated
Makefile to sign extension bundles on macOS. The variable specifies a
key identifier to use for signing given by the user. However, the key
is usually stored in `$HOME/Library/Keychains` directory, and the test
suite creates a fake `$HOME` directory. This causes the test suite to
try to find the specified key from the fake home directory, which
results in a failure.

https://github.com/rubygems/rubygems/commit/ddcfc65bf7
2024-03-04 06:36:29 +00:00
Thomas Marshall 7e4b1f8e19
[Bug #20322] Fix rb_enc_interned_str_cstr null encoding
The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be
a null pointer, but this currently causes a segmentation fault when
trying to autoload the encoding. This commit fixes the issue by checking
for NULL before calling `rb_enc_autoload`.
2024-03-03 10:43:35 +00:00
Nobuyoshi Nakada 9b75e5f085
Add an example for fallback to sh 2024-03-01 13:56:52 +09:00
Kevin Newton 49aa8d655e [PRISM] Fix version spec to account for prism 2024-02-28 11:42:49 -05:00
Kenta Murata 54a5b82944
Handle zero-like imaginary part as zero in to_r (#9581)
Fixes [Bug #5179]
2024-02-27 09:37:03 +09:00
Benoit Daloze 815db5c028 Update to ruby/spec@3a510bb 2024-02-26 14:45:30 +01:00
Benoit Daloze 40c9a3dad5 Update to ruby/mspec@36e8ed8 2024-02-26 14:45:28 +01:00
Peter Zhu 510404f2de Stop using rb_fstring publicly
rb_fstring is a private API, so we should use rb_str_to_interned_str
instead, which is a public API.
2024-02-23 13:33:46 -05:00
Nobuyoshi Nakada 8c5b7eb05f
[Bug #20280] Fix wrong tests 2024-02-19 16:33:27 +09:00
Hiroshi SHIBATA a52fc5df7a [rubygems/rubygems] Use FileUtils.mkdir_p
https://github.com/rubygems/rubygems/commit/af806b8dff
2024-02-19 05:45:51 +00:00
Hiroshi SHIBATA fbc29ce032
Avoid to fail with race condition 2024-02-16 18:16:15 +09:00
Hiroshi SHIBATA 62ab93357f Try to test net-ftp examples again 2024-02-16 17:28:00 +09:00
Hiroshi SHIBATA 7b568b1f78 [rubygems/rubygems] bin/rubocop -a
https://github.com/rubygems/rubygems/commit/f79a6a004d
2024-02-16 05:38:41 +00:00
Jason Garber 6f224d66a5 [rubygems/rubygems] Add `gitlab:` Git source shorthand
This new shorthand, similar to the existing `github:` shorthand, adds
support for Gitlab repositories with a notable difference. Gitlab
projects may be organized into projects and subprojects. An example
Ruby gem exists at:

https://gitlab.com/gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb

With the new shorthand, a user may install this gem from its repository
by adding:

```ruby
gem "gitlab-sdk", gitlab: "gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb"
```

As with the `github:` shorthand, a supplied string with no `/` will be
interpreted as `example/example`.

Also in keeping with the utility of the `github:` shorthand, the new
`gitlab:` shorthand also supports Merge Request URLs.

```ruby
gem "gitlab-sdk", gitlab: "https://gitlab.com/gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb/-/merge_requests/27"
```

The `gitlab:` gem source shortcut is modeled on the existing `github:`
shortcut, so the new specs mimic the existing examples.

https://github.com/rubygems/rubygems/commit/f4399018c0
2024-02-16 04:53:14 +00:00
Cody Cutrer fa334ecd40 [rubygems/rubygems] use full path for instance_eval
so that __dir__ and __FILE__ will work properly from within that gemfile
fragment, if eval_gemfile is given a relative path

https://github.com/rubygems/rubygems/commit/d521bf9790
2024-02-15 20:26:03 +00:00
Hiroshi SHIBATA 18da80e100 Skip failing examples at Ruby 3.2+ 2024-02-15 20:34:52 +09:00
Hiroshi SHIBATA 4aef875205 Surpressing constant redefinition warning 2024-02-15 20:34:52 +09:00
Hiroshi SHIBATA 1e426bd5e5 Exclude net-ftp examples because it has dependency issue 2024-02-15 20:34:52 +09:00
Hiroshi SHIBATA 8ba053d3fb Re-enabled old bundled gems 2024-02-15 20:34:52 +09:00
Yusuke Endoh 8f2c231642 ruby-spec: Accept the receiver in backtraces 2024-02-15 19:11:58 +09:00
Hiroshi SHIBATA 4a00fcbd92 Rename and restructured net/ftp and net/http examples 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA fa7529afd5 Move examples related core extension feature by Bigdecimal to under the library/bigdecimal 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA 121dfb38be Surpressing constant redefinition warning 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA 1e6fffaeeb Added new ruby/spec task for bundled gems 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA 76d322b5d2 Disable to run for bundled gems in test-spec 2024-02-15 18:57:23 +09:00
Yusuke Endoh 92eab382e4 Update the error message format in bundler 2024-02-15 18:42:31 +09:00
Yusuke Endoh 8259f35adc ruby-spec: Accept both a backtick and a single quote in error messages 2024-02-15 18:42:31 +09:00
Benoit Daloze d24be39d69 Only check constant leaks by default for `make test-spec`
* See https://github.com/ruby/ruby/pull/9548
2024-02-15 07:44:03 +09:00
Jean Boussier de1a586ecc proc.c: get rid of `CLONESETUP`
[Bug #20253]

All the way down to Ruby 1.9, `Proc`, `Method`, `UnboundMethod`
and `Binding` always had their own specific clone and dup routine.

This caused various discrepancies with how other objects behave
on `dup` and `clone. [Bug #20250], [Bug #20253].

This commit get rid of `CLONESETUP` and use the the same codepath
as all other types, so ensure consistency.

NB: It's still not accepting the `freeze` keyword argument on `clone`.

Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2024-02-12 18:31:48 +01:00
Benoit Daloze ffe1a68bda Skip spec failing on i686 2024-02-12 11:33:08 +01:00
Benoit Daloze d15301d482 Exclude a problematic spec when run in CRuby via make test-spec until fixed 2024-02-12 11:05:51 +01:00
Benoit Daloze b19d2409be Update to ruby/spec@ce834ad 2024-02-12 10:56:33 +01:00
David Rodriguez a35cade791
[rubygems/rubygems] Improve assertion
https://github.com/rubygems/rubygems/commit/7f2f2b898c

Co-authored-by: Martin Emde <martin.emde@gmail.com>
2024-02-08 14:43:56 +09:00
David Rodriguez 0c71fb4b86
[rubygems/rubygems] Run definition specs in an isolated location
And consistently pass Pathname's to `Definition.new` like production
code does.

https://github.com/rubygems/rubygems/commit/660def5b68
2024-02-08 14:43:56 +09:00
David Rodriguez 5500f880f3
[rubygems/rubygems] Fix incorrect 4th parameter to Definition.new
https://github.com/rubygems/rubygems/commit/54948e428d
2024-02-08 14:43:56 +09:00
David Rodriguez e04120772b
[rubygems/rubygems] Move `subject` to top level context
https://github.com/rubygems/rubygems/commit/331c415af0
2024-02-08 14:43:56 +09:00
David Rodríguez 24d5e7176e
[rubygems/rubygems] Refactor lockfile generation
https://github.com/rubygems/rubygems/commit/6a0c03c77f
2024-02-08 14:43:56 +09:00
Benoit Daloze 40642cd3bc Update to ruby/spec@3fc4444 2024-02-05 16:29:57 +01:00
Benoit Daloze abe07d4bf5 Update to ruby/mspec@31f51e0 2024-02-05 16:29:56 +01:00
Benoit Daloze d9bd64f9ee Fix typo 2024-02-05 16:29:25 +01:00
David Rodriguez a4e4e3b1f1 [rubygems/rubygems] Add missing Windows job
Specs that use extension gems were failing in the new job but I noticed
that they were using very non standard `extconf.rb` files.

The hack being removed here was added just to make specs pass when run
in ruby-core but it seems the underlying issue has been fixed now, and
it's causing issues with Ruby 3.3 and Windows, so necessary so I'm
removing it and moving on.

https://github.com/rubygems/rubygems/commit/5b78275f0e
2024-02-02 11:43:10 +00:00
David Rodriguez 95c9711d6e [rubygems/rubygems] Fix musl platform not being added to the lockfile
https://github.com/rubygems/rubygems/commit/235f7b4266
2024-01-31 19:07:39 +00:00
David Rodriguez a322b2faa4 [rubygems/rubygems] Make slow perf specs more stable
This seems worse to detect performance regressions, but at least should
not have many false positives.

https://github.com/rubygems/rubygems/commit/0b28e55415
2024-01-31 13:22:38 +00:00
David Rodriguez 171d4bec25 [rubygems/rubygems] Fix some flaky test failures on Windows
Some specs assert empty output, but sometimes they print warnings about
redefinition warnings. Ignore those until they are fixed upstream.

https://github.com/rubygems/rubygems/commit/0cd3b6dbae
2024-01-31 12:14:03 +00:00
Masato Ohba 933ede5d76 [rubygems/rubygems] Remove `travis_removal_info`
`travis_removal_info` is added by https://github.com/rubygems/rubygems/pull/6150. According to the comment, it's supposed to be removed at bundler v2.5.0 but it hasn't.

https://github.com/rubygems/rubygems/commit/e18797d43f
2024-01-29 05:39:13 +00:00
David Rodríguez 355480dec6 [rubygems/rubygems] Properly restore empty env vars
https://github.com/rubygems/rubygems/commit/e0d68a8688
2024-01-29 12:19:31 +09:00
David Rodríguez 5a884c2e00 [rubygems/rubygems] Add a spec to prove uri is no longer loaded
https://github.com/rubygems/rubygems/commit/3a262f55c8
2024-01-29 12:15:37 +09:00
David Rodríguez 5f9c120073 [rubygems/rubygems] Remove no longer needed uri install during specs
https://github.com/rubygems/rubygems/commit/7f35dc19c5
2024-01-29 12:15:26 +09:00
David Rodríguez f3123f8af2 [rubygems/rubygems] Use rubygems vendored uri from Bundler when available
https://github.com/rubygems/rubygems/commit/5d6a8f2fb4
2024-01-29 12:15:10 +09:00
Hiroshi SHIBATA 6191f4a169 [rubygems/rubygems] Simplified test-case for original issue
https://github.com/rubygems/rubygems/commit/89086c5458
2024-01-24 09:11:54 +00:00
Hiroshi SHIBATA 723deec9cf [rubygems/rubygems] Keep compatibility of past versions
https://github.com/rubygems/rubygems/commit/54b67fb251
2024-01-24 09:11:53 +00:00
Hiroshi SHIBATA 1018dca09a [rubygems/rubygems] Skip to load commented out words
https://github.com/rubygems/rubygems/commit/e6a9148ba2
2024-01-24 09:11:53 +00:00
Jean Boussier b4b35b1468 Add an autoload spec for the behavior inside autoload but after the constant is defined 2024-01-22 13:45:24 +01:00
Hiroshi SHIBATA f2dce4e6e0 spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/csv/**/*.rb 2024-01-22 18:23:05 +09:00
Hiroshi SHIBATA b5b98546cf spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/syslog/**/*.rb 2024-01-22 15:59:40 +09:00
KJ Tsanaktsidis 33290896dc Disable NSS modules when using the leakchecker
The leakchecker will report leaked file descriptors when tests do things
like access `Etc.getgrgid`, for example, if NSS modules (like `sss`)
handle these lookups by connecting to a daemon like `sssd` and leave the
connection open.

To address this, we can call glibc's `__nss_configure_lookup` to
override NSS modules configured in /etc/nsswitch.conf and only use
ordinary file/DNS lookups.

(This is a cherry-pick of a patch applied to ruby/mspec here:
https://github.com/ruby/mspec/pull/62)
2024-01-22 13:44:52 +11:00
Hiroshi SHIBATA 87f16fbc6d spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/drb/start_service_spec.rb 2024-01-22 11:08:59 +09:00
Hiroshi SHIBATA f4670b46c4 spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/abbrev/**/*.rb 2024-01-19 16:27:45 +09:00
Hiroshi SHIBATA 8b551b0e7a spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/observer/**/*.rb 2024-01-19 15:24:09 +09:00
Hiroshi SHIBATA 7cb1125446 spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/core/rational/coerce_spec.rb 2024-01-18 07:44:13 +09:00
Hiroshi SHIBATA 44d74f22c8 Guard bigdecimal related examples
spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/core/integer/coerce_spec.rb
  spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/shared/rational/coerce.rb
  spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/bigmath/log_spec.rb

  and example of at_spec.rb
2024-01-18 07:44:13 +09:00
Hiroshi SHIBATA 4328f190ea spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/bigdecimal/**/*_spec.rb 2024-01-18 07:44:13 +09:00
Hiroshi SHIBATA 6c016a4197 Inject base64 for basic auth examples of bundler 2024-01-17 08:28:31 +09:00
Hiroshi SHIBATA afb30eb265 spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/base64/**/*_spec.rb 2024-01-17 08:28:31 +09:00
Nobuyoshi Nakada d6b6e14c87
Specify ruby mode [ci skip] 2024-01-16 22:13:16 +09:00
Nobuyoshi Nakada 01459f1644
Set `CHECK_LEAKS` in spec/default.mspec
Because of `.NOEXPORT:` in template/Makefile.in, variables in
common.mk will not be exported.
2024-01-16 20:29:06 +09:00
Hiroshi SHIBATA b3ff564967 spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/getoptlong/**/*.rb 2024-01-16 17:07:10 +09:00
Nobuyoshi Nakada be7c91db44
Do not pollute toplevel namespace 2024-01-16 12:43:53 +09:00
Hiroshi SHIBATA 0a27142cf1 Ignore windows_31j module with mswin 2024-01-12 20:02:50 +09:00
Hiroshi SHIBATA 3113bc8d44 stat command is not provided on Windows 2024-01-12 20:02:50 +09:00
Hiroshi SHIBATA 3103ed4159 Use timeout instead of sleep on Windows 2024-01-12 20:02:50 +09:00
Hiroshi SHIBATA 80feecd6a3 Don't use cat command on native Windows 2024-01-12 20:02:50 +09:00
David Rodríguez f4a347b90f [rubygems/rubygems] Fix Bundler daily CI
There is another place artifice usage was making the copy of vendored
http in ruby-core be loaded instead of the one under test.

Remove unnecessary usage of artifice.

https://github.com/rubygems/rubygems/commit/d2488199b0
2024-01-11 13:51:52 +09:00
David Rodríguez ef0705b3c2 [rubygems/rubygems] Fix development dependency not being added if introduced by two gemspecs
https://github.com/rubygems/rubygems/commit/adc05bf1c3
2024-01-11 13:51:52 +09:00
David Rodríguez b8f859f0bf Complete missing specs for platforms after resolution
If two platform specific variants have different dependencies, then
resolution may fallback to the non platform specific variant. However,
the platform specific variants that have the same dependencies as the
non specific one can still be kept.

Do a pass to complete those after resolution.
2024-01-11 13:51:52 +09:00
David Rodríguez 580d4a4053 [rubygems/rubygems] Show diff on source control errors
https://github.com/rubygems/rubygems/commit/d728fa1b04
2024-01-11 13:51:52 +09:00
Martin Emde 098d97e96d [rubygems/rubygems] Quote Etag in `If-None-Match` header of compact index request
https://github.com/rubygems/rubygems/commit/d26bcd7551
2024-01-05 02:06:58 +00:00
Hiroshi SHIBATA 50b783ccac [ruby/syntax_suggest] Typofix by misspell
https://github.com/ruby/syntax_suggest/commit/66e1cf0b3e
2023-12-26 02:10:25 +00:00
Takashi Kokubun 6e13cde457 Re-skip a failing spec 2023-12-25 01:25:36 -08:00
Nobuyoshi Nakada b641b7e640
Move non-portable pragmas to rubyspec.h
In the extension libraries in spec/ruby/optional/capi, do not care
about deprecated declarations.
2023-12-25 14:11:49 +09:00
Hiroshi SHIBATA 863ded45a1
Typofix under bootstraptest, spec and yjit directories 2023-12-25 13:50:23 +09:00
Nobuyoshi Nakada fd3dede7f4
Fix for older set versions
`Set::VERSION` was not defined in old set.rb bundled with ruby 3.2 or
earlier.
Also add comment for spec/mspec/tool/remove_old_guards.rb.
2023-12-23 18:57:47 +09:00
Nobuyoshi Nakada dc7785e16b
Set 1.1 now checks subclass-ness stricter 2023-12-23 18:15:26 +09:00
Hiroshi SHIBATA 7d7a84e99f Merge RubyGems-3.5.3 and Bundler-2.5.3 2023-12-23 09:34:26 +09:00
Koichi Sasada 2fe9e08578 MN: skip RUBY_DESCRIPTION spec on MN enabled 2023-12-23 08:10:41 +09:00
Hiroshi SHIBATA 82496f2b38 Merge RubyGems-3.5.2 and Bundler-2.5.2 2023-12-22 07:24:04 +09:00
Hiroshi SHIBATA d7d10f3ee8
Adjust rubygems style 2023-12-17 05:45:33 +08:00
Hiroshi SHIBATA 8db0de92a8
Restore tracked_files for ruby core repo 2023-12-17 05:39:16 +08:00
Hiroshi SHIBATA 40113454b1 Use regex instead of hard coded paths 2023-12-16 21:02:45 +09:00
Hiroshi SHIBATA ab87cd0baa We don't use tracked_files in before(:suite). It breaks with release package. 2023-12-16 21:02:45 +09:00
David Rodríguez 7cd4282cc8 [rubygems/rubygems] Fix Bundler daily CI
A default Bundler copy with vendored net-http is causing a Bundler spec
to end up loading that copy instead of the copy of Bundler under test.
This is because of vcr, but we don't really need vcr in the command
that's failing, so I avoided loading it.

https://github.com/rubygems/rubygems/commit/304ab6e1b9
2023-12-16 10:07:52 +08:00
David Rodríguez c8e9cd2b8b [rubygems/rubygems] Fix Ruby DSL no longer working as expected
https://github.com/rubygems/rubygems/commit/f6258e5679

Co-authored-by: AndrewSwerlick <andrew.swerlick@gmail.com>
2023-12-16 10:04:38 +08:00
Martin Emde 1cfe874ef8 [rubygems/rubygems] Remove test-only & unused methods from Checksum::Store
https://github.com/rubygems/rubygems/commit/79636dec12
2023-12-15 19:36:24 +00:00
David Rodríguez d718654bb1
[rubygems/rubygems] Remove extension building sync stuff no longer present in RubyGems
https://github.com/rubygems/rubygems/commit/59a85388b9
2023-12-14 20:22:48 +08:00
David Rodríguez b300f5a0e1
[rubygems/rubygems] Revert "Improve default gem handling"
This reverts commit https://github.com/rubygems/rubygems/commit/091b4fcf2b99.

https://github.com/rubygems/rubygems/commit/dcade3235f
2023-12-14 20:22:48 +08:00
Martin Emde c1f4bfd41f [rubygems/rubygems] Revert "Merge pull request #7167 from nevinera/add-json-output-option-to-bundle-outdated"
This reverts commit https://github.com/rubygems/rubygems/commit/a4ac5116b8ea, reversing
changes made to https://github.com/rubygems/rubygems/commit/8a6b180d0ae5.

https://github.com/rubygems/rubygems/commit/a1efe4015d
2023-12-13 22:50:45 +00:00
Samuel Giddins 6aa26af683 [rubygems/rubygems] Add 3.4 as a supported ruby version
Since ruby trunk will be 3.4 very soon

https://github.com/rubygems/rubygems/commit/36dd9a35dc
2023-12-13 19:02:24 +00:00
David Rodríguez ac939d9ca3 [rubygems/rubygems] Improve default gem handling
If a gem is specified in the Gemfile (or resolved as a transitive
dependency), it's always resolved from remote/installed sources. Default
gems are only used as a fallback for gems not included in the bundle.

I believe this leads to more consistent behavior and more portable apps,
since all gems will be installed to the configured bundle path,
regardless of whether they are default gems or not.

https://github.com/rubygems/rubygems/commit/091b4fcf2b
2023-12-13 13:02:22 +09:00
David Rodríguez 6b3c9cebe9 Normalize bundler bindir
This makes bundler consistent with all other gems, and makes the default
installation of Bundler in the release package look like any other
bundler installation.

Before (on preview3, for example), Bundler executable is installed at:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle

Now it's installed in the standard location:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/exe/bundle
2023-12-13 12:59:23 +09:00
Hiroshi SHIBATA 866b6fcd69 RubyGems 3.5+ will use vendored net-http 2023-12-13 12:16:55 +09:00
David Rodríguez 844759ccdb [rubygems/rubygems] Add a spec to cover what vendoring timeout fixes
https://github.com/rubygems/rubygems/commit/2662e45d75
2023-12-13 12:16:55 +09:00
David Rodríguez 5323935f57 [rubygems/rubygems] Remove no longer needed gem install during test
https://github.com/rubygems/rubygems/commit/bdb78d8289
2023-12-13 12:16:55 +09:00
David Rodríguez 90317472e8 [rubygems/rubygems] Use vendored net-http in Bundler
https://github.com/rubygems/rubygems/commit/0d758e8926
2023-12-13 12:16:55 +09:00
David Rodríguez 6cefad7704 [rubygems/rubygems] Avoid loading artifice when not necessary
https://github.com/rubygems/rubygems/commit/ef97ad37bd
2023-12-13 12:16:55 +09:00
David Rodríguez 7d5d2eef78 [rubygems/rubygems] Load hax.rb before anything when `BUNDLER_IGNORE_DEFAULT_GEM` set
https://github.com/rubygems/rubygems/commit/111bd11c36
2023-12-13 12:16:55 +09:00
David Rodríguez 1572322e17
Sync with upstream rubygems (#9206) 2023-12-12 11:49:25 -08:00
David Rodríguez 67940b135c [rubygems/rubygems] Bump rake version used by tests
And make it easier to update next time.

https://github.com/rubygems/rubygems/commit/1ea4bfa5d8
2023-12-12 17:16:19 +00:00
Martin Emde d1c25605f6 [rubygems/rubygems] Resolve `ruby file: ".ruby-version"` relative to Gemfile
https://github.com/rubygems/rubygems/commit/0cbbaed8a5
2023-12-12 12:40:17 +00:00
Martin Emde 1e5c8afb15 [rubygems/rubygems] Ensure that the lockfile mtime is not altered on frozen install
https://github.com/rubygems/rubygems/commit/6847709ee0
2023-12-12 02:39:57 +00:00
Franz Liedke 0ec88b54f3 [rubygems/rubygems] bundle lock: Always touch the lockfile
https://github.com/rubygems/rubygems/commit/fd2e71dfdb
2023-12-12 01:08:19 +00:00
Martin Emde 0e05392dcc
[rubygems/rubygems] Make tests compatible with paths that contain a + char
https://github.com/rubygems/rubygems/commit/3355c80c90
2023-12-12 10:04:57 +09:00
Martin Emde 3b9ea6648f
[rubygems/rubygems] Use StringIO 3.1.0 in tests to work with ruby 3.3.0
https://github.com/rubygems/rubygems/commit/8a936d733d
2023-12-12 10:04:57 +09:00
Martin Emde e186cebe42 [rubygems/rubygems] Override initialize in bundle rubygems_ext for NameTuple
https://github.com/rubygems/rubygems/commit/f63ce682d2
2023-12-11 15:40:08 +00:00
David Rodríguez 01a2a0abc6 [rubygems/rubygems] Migrate documentation to be generated with nronn
https://github.com/rubygems/rubygems/commit/55281f0eaa
2023-12-08 16:01:01 +09:00
Samuel Giddins 4817166e54 [rubygems/rubygems] Extract generate_index command to rubygems-generate_index gem
So generate_index can be implemented with dependencies, such as the compact index

Took this approach from feedback in https://github.com/rubygems/rubygems/pull/6853

Running `gem generate_index` by default will use an installed rubygems-generate_index, or install and then use the command from the gem

Apply suggestions from code review

https://github.com/rubygems/rubygems/commit/fc1cb9bc9e

Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2023-12-08 06:09:51 +00:00
Yuji Yaginuma 8bb90f4d77 [rubygems/rubygems] Use `Minitest::TestTask` in a template file for `minitest`
`minitest` has introduced a rake task for running test on 5.16.0.
https://github.com/minitest/minitest/blob/master/History.rdoc#5160--2022-06-14-

This has some tasks related to running tests and it's useful for
`minitest` user I think.
https://github.com/minitest/minitest#rake-tasks-

This PR changed to use the task in a template file for `minitest`

https://github.com/rubygems/rubygems/commit/7a86d13062
2023-12-08 03:25:43 +00:00
David Rodríguez 2755cb1b2f [rubygems/rubygems] Use modern hashes consistently
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-12-07 22:29:33 +00:00
Jeremy Evans ca204a2023
Fix keyword splat passing as regular argument
Since Ruby 3.0, Ruby has passed a keyword splat as a regular
argument in the case of a call to a Ruby method where the
method does not accept keyword arguments, if the method
call does not contain an argument splat:

```ruby
def self.f(obj) obj end
def self.fs(*obj) obj[0] end
h = {a: 1}
f(**h).equal?(h)  # Before: true; After: false
fs(**h).equal?(h) # Before: true; After: false

a = []
f(*a, **h).equal?(h)  # Before and After: false
fs(*a, **h).equal?(h) # Before and After: false
```

The fact that the behavior differs when passing an empty
argument splat makes it obvious that something is not
working the way it is intended.  Ruby 2 always copied
the keyword splat hash, and that is the expected behavior
in Ruby 3.

This bug is because of a missed check in setup_parameters_complex.
If the keyword splat passed is not mutable, then it points to
an existing object and not a new object, and therefore it must
be copied.

Now, there are 3 specs for the broken behavior of directly
using the keyword splatted hash.  Fix two specs and add a
new version guard. Do not keep the specs for the broken
behavior for earlier Ruby versions, in case this fix is
backported. For the ruby2_keywords spec, just remove the
related line, since that line is unrelated to what the
spec is testing.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-12-07 08:35:55 -08:00
Eric Mueller 9336bbb0b2 [rubygems/rubygems] Bundler::Fetcher uses Bundler::CIDetector
Additionally, the result is memoized, as it's used twice in a row.

This change does result in a net behavioral diff, as the list of ENVs
being checked has been updated (now includes buildkite, taskcluster,
cirrus, dsari, and drops buildbox and snap)

https://github.com/rubygems/rubygems/commit/3fb445a5a1
2023-12-06 20:05:25 +00:00
Eric Mueller 6fd3b358ff [rubygems/rubygems] Duplicate Gem::CIDetector into bundler
Because bundler needs to support older versions of rubygems, we can't
actually rely on Gem::CIDetector (yet - in a year or so they might be
able to consolidate, if they don't change futher). So we're copying it
into the Bundler:: namespace, and enforcing that they stay completely in
sync with a test. No other tests are needed, since Gem::CIDetector is
already tested, and this is and will remain identical.

https://github.com/rubygems/rubygems/commit/abc67f0da1
2023-12-06 20:05:25 +00:00
Martin Emde 5f0ea3f590 [rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in only
Looks for the CHECKSUMS section in the lockfile, activating the feature
only if the section exists. Without a CHECKSUMS section, Bundler will
continue as normal, validating checksums when gems are installed while
checksums from the compact index are present.

https://github.com/rubygems/rubygems/commit/2353cc93a4
2023-12-05 21:09:53 +00:00
Schneems 82883dc8f2 [ruby/syntax_suggest] Change assertion to not rely on exact text from prism
The original ripper test was very stable as the output didn't change. Prism is under active development and changing their output shouldn't cause a failure to the ruby/ruby test suite like https://github.com/ruby/ruby/actions/runs/7104601478/job/19339940315.

This commit moves from checking exact output to asserting that the string we get back is not empty. This should give the same level of confidence that some error message was caught, and is less brittle.

https://github.com/ruby/syntax_suggest/commit/4b6abb763e
2023-12-05 18:25:42 +00:00
Schneems 6d39d6d214 [ruby/syntax_suggest] Update docs, clean up PR
Removes or updates mentions of Ripper

https://github.com/ruby/syntax_suggest/commit/08aaa3f50a
2023-12-05 17:51:29 +00:00
Schneems 62c9695911 [ruby/syntax_suggest] Support lexing with Prism
https://github.com/ruby/syntax_suggest/commit/7f4176a914
2023-12-05 17:51:28 +00:00
Schneems cce29750d7 [ruby/syntax_suggest] Initial support for the prism parser
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers.

Todo:

- LexAll to support Prism lex output
- Add tests that exercise both Ripper and prism codepaths on CI
- Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb`
- Update docs to not mention Ripper explicitly
- Consider different/cleaner APIs for separating out Ripper and Prism

https://github.com/ruby/syntax_suggest/commit/a7d6991cc4
2023-12-05 17:51:27 +00:00
David Rodríguez 16669cd6ad [rubygems/rubygems] Fix crash when duplicating a dev dependency in Gemfile & gemspec
https://github.com/rubygems/rubygems/commit/e78c0a4a48
2023-12-05 14:28:42 +09:00
Schneems 5a2d70ef73 [ruby/syntax_suggest] Bump minimum Ruby version & update standardrb
https://github.com/ruby/syntax_suggest/commit/73753518e9
2023-12-04 22:29:44 +00:00