2463 Commits

Author SHA1 Message Date
David Rodriguez
281df1e495 [rubygems/rubygems] Remove Gem::Specification#mark_version
This gets in the middle if we ever start allowing to build as if using a
different RubyGems version than the one being run.

This could be useful to make `gem rebuild` a little more usable, and
it's already done by Bundler specs which already make this method a noop
when they need this.

I'm not sure forcefully setting this, even if user explicitly specified
something else is helpful.

Since this could potentially prevent gems explicitly setting a constant
RubyGems version from building, I changed the error of incorrect
RubyGems version from a hard error to a warning, since it will start
happening in those cases if we stop overwriting the version.

https://github.com/rubygems/rubygems/commit/45676af80d
2024-05-03 15:12:55 +00:00
Stan Lo
c681af3e5d Reject empty lines in IRB binding spec
For that particular spec, the empty lines' presence is not relevant.
So let's remove them to make the spec easier to maintain.
2024-05-02 14:33:30 -04:00
Kevin Newton
41977ef595 [PRISM] Enable Socket.gethostbyaddr spec 2024-05-02 10:29:17 -04:00
Nobuyoshi Nakada
12cbfd8e2f
Declare as NORETURN 2024-05-02 22:11:15 +09:00
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