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

2138 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 1bda22f5fe
`Refinement#refined_class` is now deprecated 2023-07-31 23:23:30 +09:00
Nobuyoshi Nakada 0d86cc4caf [rubygems/rubygems] Use the dedicated method to convert file path
The dedicated method `File.path` to deal with pathname-like objects
has been provided since ruby 1.9.0.
Also adds a test for rubygems/rubygems#6837.

https://github.com/rubygems/rubygems/commit/258c6eda80
2023-07-30 01:36:23 +00:00
Nobuyoshi Nakada 3d87eec94a Add examples of `return` in `eval` 2023-07-30 00:44:13 +09:00
Hiroshi SHIBATA 35517baae5 Use Gem::BUNDLED_GEMS::SINCE 2023-07-28 14:57:10 +09:00
Jeremy Evans 786a864900 Make {Nil,True,False}Class#singleton_method always raise NameError
{Nil,True,False}Class#singleton_methods always returns [] indicating
that there are no singleton methods defined, so #singleton_method
should be consistent with that.

Fixes [Bug #11064]
2023-07-26 07:27:15 -07:00
Hiroshi SHIBATA cf1f2e9d06 [rubygems/rubygems] bin/rubocop -A
https://github.com/rubygems/rubygems/commit/e8a4184429
2023-07-25 06:23:29 +00:00
Hiroshi SHIBATA 979d1fa5fe [rubygems/rubygems] Extract Gem::BUNDLED_GEMS from Bundler
https://github.com/rubygems/rubygems/commit/e30e86aa60
2023-07-25 06:23:28 +00:00
Hiroshi SHIBATA 8fbe7d0295 [rubygems/rubygems] Skip warnings if bundled gems is already loaded
https://github.com/rubygems/rubygems/commit/9583a7eb82
2023-07-25 06:23:28 +00:00
Hiroshi SHIBATA 64530b545f [rubygems/rubygems] Added warnings targets for old version of Ruby
https://github.com/rubygems/rubygems/commit/d0c1d97105
2023-07-25 06:23:26 +00:00
Hiroshi SHIBATA fc5dbea4c3 [rubygems/rubygems] Added Ruby version for bundled gems to warnings
https://github.com/rubygems/rubygems/commit/d61c1362e7
2023-07-25 06:23:26 +00:00
Hiroshi SHIBATA cc2617ae3f [rubygems/rubygems] Added csv as stub gem to build_repo1
https://github.com/rubygems/rubygems/commit/d2f2597c31
2023-07-25 06:23:24 +00:00
Hiroshi SHIBATA df4ac25bd9 [rubygems/rubygems] Added examples for warnings feature
https://github.com/rubygems/rubygems/commit/78807add23
2023-07-25 06:23:24 +00:00
Jean Boussier 43a5c19135 Use the caller location as default filename for eval family of methods
[Feature #19755]

Before (in /tmp/test.rb):

```ruby
Object.class_eval("p __FILE__") # => "(eval)"
```

After:

```ruby
Object.class_eval("p __FILE__") # => "(eval at /tmp/test.rb:1)"
```

This makes it much easier to track down generated code in case
the author forgot to provide a filename argument.
2023-07-24 14:51:20 +02:00
Hiroshi SHIBATA dd1af4b22d
[rubygems/rubygems] Rename local to lockfile and global to system
https://github.com/rubygems/rubygems/commit/456fd05d3a
2023-07-24 15:04:24 +09:00
David Rodríguez 0b0df03b0d
[rubygems/rubygems] Avoid printing using messages when version has not changed
https://github.com/rubygems/rubygems/commit/9635a2fd74
2023-07-24 15:03:15 +09:00
David Rodríguez 8c82b35791
[rubygems/rubygems] Exclude Bundler from missing locked dependencies check
Bundler is special since it's not actually locked in the lockfile as a
regular gem (only via `BUNDLED WITH`). So exclude it from that check.

https://github.com/rubygems/rubygems/commit/9f1756ec47
2023-07-24 15:03:15 +09:00
David Rodríguez 0e7536bf49 [rubygems/rubygems] Prefer squiggly heredocs over custom helper
https://github.com/rubygems/rubygems/commit/258476c38a
2023-07-24 14:59:34 +09:00
David Rodríguez 5a43b0ddd5 [rubygems/rubygems] Remove unused module inclusion
https://github.com/rubygems/rubygems/commit/0f58ef6a32
2023-07-24 14:59:34 +09:00
David Rodríguez c31a9cf829 [rubygems/rubygems] Refactor spec helpers for reading lockfiles
https://github.com/rubygems/rubygems/commit/ea2a30ba08
2023-07-24 14:59:33 +09:00
David Rodríguez ebc3174123 [rubygems/rubygems] Simplify `bundle lock` specs
https://github.com/rubygems/rubygems/commit/6301d3eece
2023-07-24 14:59:32 +09:00
Jean Boussier 460c27dc15 [ruby/syntax_suggest] Handle new eval source location
See https://bugs.ruby-lang.org/issues/19755

In Ruby 3.3, using `eval` without providing a source location
will now default to `"(eval at #{__FILE__}:#{__LINE__})"`.

https://github.com/ruby/syntax_suggest/commit/8e5076472e
2023-07-20 17:58:52 +00:00
Nobuyoshi Nakada 9c94db7cfc
Add tests for `return` in `BEGIN` and `END` blocks 2023-07-19 00:43:25 +09:00
Jean Boussier fa30b99c34 Implement Process.warmup
[Feature #18885]

For now, the optimizations performed are:

  - Run a major GC
  - Compact the heap
  - Promote all surviving objects to oldgen

Other optimizations may follow.
2023-07-17 11:20:15 +02:00
alexandre184 e5825de7c9
[Bug #19769] Fix range of size 1 in `String#tr` 2023-07-15 16:36:53 +09:00
David Rodríguez c1fb25f6fc
[rubygems/rubygems] Don't run any git commands when sorting and comparing git sources
Previously, when sorting and comparing git Gemfile vs lockfile sources during
`bundler/setup` to figure out whether we need to re-resolve or not, we
would try to find the default branch if nothing more specific was
specified in the Gemfile.

If the git cache has been deleted thought, that would fail.

The error would still be swallowed (and the branch would simply not be
displayed), but trying to clone would still generate the side effect of
creating the parent folder for the clone.

That could affect non-writable systems that don't expect `bundler/setup`
to write to the filesystem at all.

To fix this, override `Bundler::Source::Git#identifier` to use
exclusively static information, so it does not even try to clone the
repo nor generate any side effects.

https://github.com/rubygems/rubygems/commit/582eb2ef39
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA 8cf5297ba5
[rubygems/rubygems] Dont't use Bundler::VERSION
https://github.com/rubygems/rubygems/commit/46cd9be69a
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA d3305cab44
[rubygems/rubygems] restart with BUNDLE_VERSION if it's specified
https://github.com/rubygems/rubygems/commit/57cfe7cf8d
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA f16c880f77
[rubygems/rubygems] Introduce bundle config set version feature
https://github.com/rubygems/rubygems/commit/c431a1df52
2023-07-13 11:36:03 +09:00
David Rodríguez 8f61a4c5b2
[rubygems/rubygems] Remove unused variable
https://github.com/rubygems/rubygems/commit/802457b0a1
2023-07-13 11:36:03 +09:00
Benoit Daloze 055f7219bc Improve ArgumentError message for Module#set_temporary_name 2023-07-06 18:27:13 +02:00
Benoit Daloze 9ee1877e4a Ensure the name given to Module#set_temporary_name is not a valid constant path
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-07-06 18:27:13 +02:00
Benoit Daloze e76022f41c Specs for Module#set_temporary_name should be in their own file 2023-07-06 18:27:13 +02:00
Takashi Kokubun f314656c23 Skip a failing spec for the latest bigdecimal 2023-07-05 14:18:51 -07:00
Ellen Marie Dash 4f2f1ddf22 [rubygems/rubygems] Test that git sources in lockfiles have stable sort order
https://github.com/rubygems/rubygems/commit/4c982684ea
2023-07-04 14:54:26 +09:00
David Rodríguez 09382135de [rubygems/rubygems] Fix git source lockfile unstability
We have some flags that limit running git commit commands under certain
situations, for example, when running under `--local`. However, those
should only affect remote git operations, not local read-only operations
like `git --version`, or `git rev-parse --abbrev-ref HEAD`.

This commit refactors things to achieve that.

By doing this, the `#to_s` representation of a source is more
consistent, since we don't get any errors when reading the checked out
branch, and we avoid some flip-flop lockfile issues.

https://github.com/rubygems/rubygems/commit/4a529fce81
2023-07-04 14:54:26 +09:00
David Rodríguez 0fcb4c6af7 [rubygems/rubygems] Fix another incorrect removal of "ruby" platform from lockfile
When dependencies in path sources have changed, we'll be re-resolving,
and we can't really know whether the resolution will be valid or invalid
for the Ruby platform, so skip the removal in that case.

https://github.com/rubygems/rubygems/commit/afc3b0956f
2023-07-04 14:54:25 +09:00
Benoit Daloze 515bd42144 Update to ruby/spec@30e1c35 2023-06-26 15:55:11 +02:00
Benoit Daloze f73fa29927 Update to ruby/mspec@3cf2d16 2023-06-26 15:55:09 +02:00
Samuel Williams a87bce86bb
Allow setting the name of a class or module. (#7483)
Introduce `Module#set_temporary_name` for setting identifiers for otherwise
anonymous modules/classes.
2023-06-21 16:49:51 +09:00
Hiroshi SHIBATA 1edbaa850f Merge rubygems/rubygems HEAD
Pick from 880dd95996
2023-06-20 13:35:13 +09:00
Hiroshi SHIBATA 2c219ab215 [rubygems/rubygems] Rubocop 1.51.0 or later didn't support Ruby 2.6
https://github.com/rubygems/rubygems/commit/522b5f1ecd
2023-06-15 07:01:27 +09:00
David Rodríguez 3e7f5b02ae [rubygems/rubygems] Improve error message in frozen mode edge case
When a top level dependency is missing from the lockfile, and we're in
frozen mode, we should also print a "frozen error".

https://github.com/rubygems/rubygems/commit/3e82b835e3
2023-06-15 07:01:25 +09:00
David Rodríguez e86f4c581b [rubygems/rubygems] Improve frozen mode error message
This error message is also printed when using `bundler/setup` in frozen
model, so we're not necessarily installing any gems when it happens.

This new message play nicer with all situations.

https://github.com/rubygems/rubygems/commit/6874bbacce
2023-06-15 07:01:25 +09:00
David Rodríguez 23ecaab8dd [rubygems/rubygems] Use "frozen" rather than "deployment" in error message
I think it communicates better what's going on.

https://github.com/rubygems/rubygems/commit/07a25767a4
2023-06-15 07:01:24 +09:00
David Rodríguez 2ff9b7b93d [rubygems/rubygems] Show missing spec in lockfile incomplete error message
https://github.com/rubygems/rubygems/commit/b86caaa3d5
2023-06-15 07:01:24 +09:00
David Rodríguez e7749c4dea [rubygems/rubygems] Remove weird line breaks in the middle of error message
https://github.com/rubygems/rubygems/commit/22b8caf42f
2023-06-15 07:01:21 +09:00
David Rodríguez 96e3f31c1e [rubygems/rubygems] Make frozen mode spec also pass on Bundler 3
https://github.com/rubygems/rubygems/commit/ad52f840f2
2023-06-15 07:01:20 +09:00
David Rodríguez e1038f943f [rubygems/rubygems] This spec is independent from global sources
https://github.com/rubygems/rubygems/commit/d91c245921
2023-06-15 07:01:20 +09:00
Gareth Adams eaf11d3dd4 [rubygems/rubygems] Stop publishing Gemfile in default gem template
Similarly to how the other ignored files are intended for local
development and not for production, the Gemfile and Gemfile.lock files
for a gem only relate to local development and aren't useful to people
installing the gem.

https://github.com/rubygems/rubygems/commit/59049c04be
2023-06-08 15:20:05 +00:00
David Rodríguez 03246719cc [rubygems/rubygems] Fix `path` vs `deployment` precedence when path set through ENV
The `deployment` setting sets `path` to `vendor/bundle` implicitly, but
that should only apply if `path` is not set explicitly, at any level.

https://github.com/rubygems/rubygems/commit/3552c064c1
2023-06-06 10:52:57 +09:00