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

1877 Коммитов

Автор SHA1 Сообщение Дата
David Rodríguez 7001e34323 [rubygems/rubygems] Fix failing spec on Windows
https://github.com/rubygems/rubygems/commit/8e68c57457
2022-05-30 17:42:37 +09:00
Jeremy Evans 12e34a4276 Update rubyspec for stringio bug fix 2022-05-29 21:25:05 -07:00
David Rodríguez 08b82e6b40 [rubygems/rubygems] Ignore `Errno::EROFS` errors when creating `bundler.lock`
Apparently old versions of MacOS would set `GEM_HOME` to a `/System`
folder, and trying to create a file there raises `Errno::EROFS`.

We ignore the error. Any permission issues should be better handled
further down the line.

https://github.com/rubygems/rubygems/commit/ef90c071d0
2022-05-30 00:27:43 +09:00
David Rodríguez 373dabe00a [rubygems/rubygems] Ignore `Errno::EPERM` errors when creating `bundler.lock`
This kind of error can happen when setting `GEM_HOME` to a path
under MacOS System Integrity Protection.

We ignore the error. Any permission issues should be better handled
further down the line.

https://github.com/rubygems/rubygems/commit/174cb66863
2022-05-29 22:19:35 +09:00
David Rodríguez 6778d321a7 [rubygems/rubygems] Show better error when previous installation fails to be removed
Instead of guessing on the culprit.

We actually have a helper, `Bundler.rm_rf`, with exactly the behavior
that we want:

* Allow the passed folder to not exist.
* No exception swallowing other than that.

https://github.com/rubygems/rubygems/commit/5fa3e6f04a
2022-05-27 17:26:22 +09:00
David Rodríguez 633608ebd4 [rubygems/rubygems] Fix crash when printing resolution conflicts on metadata requirements
https://github.com/rubygems/rubygems/commit/b69e1e9374
2022-05-24 21:24:57 +09:00
Jean Boussier 65122d09d5 [Feature #18595] Alias String#-@ as String#dedup 2022-05-20 11:31:59 -07:00
Hiroshi SHIBATA aeea88174d
Merge RubyGems and Bundler HEAD
125415593e
2022-05-20 17:32:19 +09:00
David Rodríguez 6850e3c42e [rubygems/rubygems] Fix locale dependent spec failure
https://github.com/rubygems/rubygems/commit/1fd818743e
2022-05-20 07:05:19 +09:00
David Rodríguez 4c9ddaac0d [rubygems/rubygems] Fix `Gemfile.lock` versions leaking to `bundler/inline` install output
The lockfile is completely ignored in inline mode, yet the previous
output would suggest it wasn't.

https://github.com/rubygems/rubygems/commit/763125a745
2022-05-13 15:23:56 +09:00
David Rodríguez 8f1a8e68ba [rubygems/rubygems] Fix error message on metadata mismatches
Previously we were removing not installable specs. However, if those are
the only ones, that would result in a bad error message. If we still
choose them as a last resort, Bundler will later check metadata right
before installing a give a proper error.

This is a regression of https://github.com/rubygems/rubygems/commit/565549260be5 and the
fix is to revert that commit.

https://github.com/rubygems/rubygems/commit/bc18912257
2022-05-11 16:55:49 +09:00
David Rodríguez c582d9862a [rubygems/rubygems] Tweak negative expectations
The follow a tweak on the yank message.

https://github.com/rubygems/rubygems/commit/f6817bfe58
2022-05-11 16:55:48 +09:00
David Rodríguez 54b1548760 [rubygems/rubygems] Extract a `next_ruby_minor` helper method for specs
https://github.com/rubygems/rubygems/commit/66eae0ef1d
2022-05-11 16:55:47 +09:00
David Rodríguez 00e5e827b1 [rubygems/rubygems] Cleanup old legacy code
https://github.com/rubygems/rubygems/commit/531d6b5fee
2022-05-09 21:25:23 +09:00
David Rodríguez 42538ad710 [rubygems/rubygems] Fix missing space in spec
https://github.com/rubygems/rubygems/commit/fabc357e70
2022-05-04 06:45:16 +09:00
Hiroshi SHIBATA 1056489ea3 Merge 3f7d0352e8 2022-04-28 19:08:49 +09:00
Hiroshi SHIBATA 678d58c850 Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5 2022-04-28 19:08:49 +09:00
David Rodríguez 5250210aa9 [rubygems/rubygems] Fix missing required rubygems version when using old APIs
A while ago, we fixed resolution when using old dependency endpoints to
also consider metadata dependencies, by requesting the full gemspec from
the marsahaled index, which includes this information as opposed to
these old APIs. This has made resolution slower, but correct, but also
introduced the issue that some old marshaled gemspecs don't include the
`required_rubygems_version` field because they were created with a
RubyGems version that predates its addition.

Use a default value in this case.

https://github.com/rubygems/rubygems/commit/5dc94afcc0

Co-authored-by: Ilya Dudarenko <i.dudarenko@tinkoff.ru>
2022-04-28 15:44:02 +09:00
Benoit Daloze 45cf4f2187 Update to ruby/spec@3affe1e 2022-04-25 14:53:54 +02:00
Benoit Daloze 6ae81d49b5 Update to ruby/mspec@215497e 2022-04-25 14:53:51 +02:00
Tim Smith 810b9c344a Resolve several markedown warnings
- Spaces before and after blocks.
- Single spaces after sentences everywhere

Signed-off-by: Tim Smith <tsmith@mondoo.com>
2022-04-19 08:32:37 +09:00
Kazuhiro NISHIYAMA 50f3e93c80
Fix a typo 2022-04-17 20:57:46 +09:00
Bobby McDonald ccb0572ff9 [rubygems/rubygems] Add modern rubies to the platforms
https://github.com/rubygems/rubygems/commit/5462322f8f
2022-04-16 08:23:21 +09:00
Nobuyoshi Nakada 9e58c3c519
Get rid of type aliasing 2022-04-07 19:07:24 +09:00
Nobuyoshi Nakada 23090cf681
Suppress an unused function 2022-04-07 18:01:10 +09:00
Jeremy Evans 0b091fdac6
Raise RuntimeError if Kernel#binding is called from a non-Ruby frame
Check whether the current or previous frame is a Ruby frame in
call_trace_func and rb_tracearg_binding before attempting to
create a binding for the frame.

Fixes [Bug #18487]

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2022-04-06 19:14:03 -07:00
Jeremy Evans d1d48cb690 Revert "Raise RuntimeError if Kernel#binding is called from a non-Ruby frame"
This reverts commit 343ea9967e.

This causes an assertion failure with -DRUBY_DEBUG=1 -DRGENGC_CHECK_MODE=2
2022-04-01 07:22:49 -07:00
Jeremy Evans fbaadd1cfe
Do not autosplat array in block call just because keywords accepted
If the block only accepts a single positional argument plus keywords,
then do not autosplat.  Still autosplat if the block accepts more
than one positional argument in addition to keywords.

Autosplatting a single positional argument plus keywords made sense
in Ruby 2, since a final positional hash could be used as keywords,
but it does not make sense in Ruby 3.

Fixes [Bug #18633]
2022-03-30 11:03:56 -07:00
Jeremy Evans d8dfabbfe6 Fix spec description
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
2022-03-29 18:14:33 -07:00
Jeremy Evans 9c1d32a7ad Make TracePoint#enable with block target current thread by default
If TracePoint#enable is passed a block, it previously started
the trace on all threads.  This changes it to trace only the
current thread by default.  To limit the scope of the change,
the current thread is only used by default if target and
target_line are both nil.  You can pass target_thread: nil
to enable tracing on all threads, to get the previous
default behavior.

Fixes [Bug #16889]
2022-03-29 18:14:33 -07:00
Benoit Daloze 8db4f25bf4 Update to ruby/spec@aaf998f 2022-03-28 17:47:04 +02:00
Jeremy Evans 343ea9967e Raise RuntimeError if Kernel#binding is called from a non-Ruby frame
Check whether the current or previous frame is a Ruby frame in
call_trace_func before attempting to create a binding for the frame.

Fixes [Bug #18487]

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2022-03-24 12:31:07 -07:00
David Rodríguez 39606a774e [rubygems/rubygems] Maybe this is now fixed
https://github.com/rubygems/rubygems/commit/d9c442e54c
2022-03-24 20:22:00 +09:00
Nobuyoshi Nakada 1357b14750
Now all extension libraries must consider the ABI header 2022-03-24 08:59:24 +09:00
Jun Aruga 1ff174bfd1 [rubygems/rubygems] Fix a test for `bin/bundle update --bundler` to pass on ruby/ruby.
Consider the case that the latest Bundler version on RubyGems is higher than
the `system_bundler_version` (= `Bundler::VERSION`) in `make test-bundler` on
ruby/ruby.

See <https://bugs.ruby-lang.org/issues/18643>.

https://github.com/rubygems/rubygems/commit/bfa2f72cfa
2022-03-23 00:01:17 +09:00
Benoit Daloze 1fd1f7bbfc Fix Markdown syntax in spec/README.md 2022-03-21 17:40:42 +01:00
Jeremy Evans b6804d62f8 Make Proc#parameters support lambda keyword for returning parameters as if lambda
This makes it easier to use Proc#parameters to build wrappers.

Implements [Feature #15357]
2022-03-17 11:52:02 -07:00
Nobuyoshi Nakada e660b934b9
A positional Hash is not keyword arguments [Bug #18632] 2022-03-17 20:53:41 +09:00
Yuta Saito e9553a8cac spec: skip specs where set TZ environment variable for WASI
WASI doesn't respect TZ env var for now
2022-03-17 17:44:41 +09:00
Yuta Saito 7023b3d394 spec: disable a part of Kernel.open spec where spawns a process for WASI
WASI doesn't provide a way to spawn a new process
2022-03-17 17:33:12 +09:00
Yuta Saito e499d32689 spec: disable part of require_relative spec where uses symlink for WASI
cap-std, an underlying sandbox implementation of WASI in wasmtime, doesn't
allow to create a symlink to an absolute path to enforce sandbox restriction.

See also: 257867a1d3
2022-03-17 12:26:19 +09:00
Yuta Saito b1bcad5e3a spec: skip '~' test for wasi due to lack of shell 2022-03-14 23:05:15 +09:00
Yuta Saito fe2e5c13f9 spec: skip ruby_exe tests for wasi due to lack of subprocess 2022-03-14 23:04:13 +09:00
Martin Dürst 267f0089d3 clarify meaning of version guards for Unicode version specs [ci skip] 2022-03-14 08:39:06 +09:00
Benoit Daloze 1b571d0abf Fix guards for unicode versions specs 2022-03-13 13:27:47 +01:00
Martin Dürst 45187a0fcd comment out failing Unicode/Emoji version checks temporarily 2022-03-13 10:52:24 +09:00
Martin Dürst 9b545b0caf update specs to check for Unicode Version 14.0.0/Emoji Version 14.0 2022-03-13 09:19:52 +09:00
Alex Gittemeier 943efa8ca6 [rubygems/rubygems] Add newline to validate_platforms! message when platform is missing
When I run bundle install with BUNDLE_DEPLOYMENT=true in the environment
on a different platform than I usually do development, I get the
following output to the console (wrapped exactly as shown):

Your bundle only supports platforms ["x86_64-darwin-19"] but your local platform
is x86_64-linux. Add the current platform to the lockfile with `bundle lock
--add-platform x86_64-linux` and try again.

Because the way the message wraps, its not as simple as copying the
suggested command to the clipboard because it contains a newline:

    $ bundle lock
    Writing lockfile to [...]/Gemfile.lock
    $ --add-platform x86_64-linux

Adding a newline right before the command forces the command in the
error message to be on the same line, which facilitates copy-pasting the
command in the message.

https://github.com/rubygems/rubygems/commit/4cf6989b11
2022-03-08 03:40:30 +09:00
David Rodríguez 156079a85d [rubygems/rubygems] Make `--strict` flag of `update` and `outdated` commands consistent
Previously they had slightly different behavior when combined with
conservative updating flags.

The correct behavior is the `--update-strict` option, so `--script` now
does that, The `--update-strict` option is left there for now but I will
deprecate it later.

https://github.com/rubygems/rubygems/commit/ab42046229
2022-03-06 22:17:00 +09:00
Nobuyoshi Nakada c757c4e054
sitelibdir makes no sense in ruby itself 2022-03-04 15:56:03 +09:00
Benoit Daloze 3b21818db1 Update to ruby/spec@82cd3a3 2022-03-03 14:43:14 +01:00
Benoit Daloze 1dc6bed0ca Update to ruby/mspec@bd47c2a 2022-03-03 14:43:11 +01:00
Yuta Saito bd1507b2f6 spec: skip ext's extension spec for --with-static-linked-ext
`resolve_feature_path` doesn't return .so when the given ext is linked
statically by --with-static-linked-ext
2022-02-28 17:59:33 +09:00
Hiroshi SHIBATA ff3d7b720e Merge RubyGems and Bundler master 2022-02-28 11:39:20 +09:00
Nobuyoshi Nakada e82f5db789
Deprecate the unintentional ability to parse `Symbol` 2022-02-26 02:42:35 +09:00
David Rodríguez 7b676b3ce3 [rubygems/rubygems] Fix corrupted lockfile when using `gemspec` and multiple sources
https://github.com/rubygems/rubygems/commit/9712262d90
2022-02-11 18:20:20 +09:00
Sven Schwyn a271acf822 [rubygems/rubygems] Fix typo in multiple gemfiles warning
https://github.com/rubygems/rubygems/commit/bc69d19097
2022-02-10 08:38:09 +09:00
Dan Jensen 0b2f6b942b [rubygems/rubygems] Skip "seller shipped" notification after delivery
If a Shipment has been delivered, there is no point in notifying the
buyer that the seller shipped. Instead, we should simply notify the
buyer that the shipment was delivered. This is relevant in cases where
the seller is late to mark a Shipment as shipped, so the first EasyPost
Tracker update marks it as delivered, or in cases where the seller
fails to mark as shipped and the buyer marks it as delivered.

This fixes a Shipment event handler so the buyer notification for
shipment is no longer invoked if the Shipment is already delivered.

https://github.com/rubygems/rubygems/commit/09c2cadc86
2022-02-01 20:07:18 +09:00
David Rodríguez 517d7c3221 Sync latest Bundler & RubyGems 2022-02-01 08:09:23 +09:00
Benoit Daloze e0c5488ff9 Update to ruby/spec@902ab83 2022-01-28 14:42:38 +01:00
Benoit Daloze bb5f710887 Update to ruby/mspec@49adc2f 2022-01-28 14:42:36 +01:00
David Rodríguez c925d3b668 [rubygems/rubygems] Fix `force_ruby_platform` ignored when lockfile includes the current specific platform
https://github.com/rubygems/rubygems/commit/9ca371adf8
2022-01-26 13:09:31 +09:00
Ngan Pham 42ef3fcaef [rubygems/rubygems] Use Gem::Platform.local instead of RUBY_PLATFORM
In certain places, we want to display the platform name with
`Gem::Platform.local` instead of `RUBY_PLATFORM`.

Fixes https://github.com/rubygems/rubygems/issues/5264

https://github.com/rubygems/rubygems/commit/bdd1848ae8
2022-01-26 02:24:30 +09:00
David Rodríguez 342e7a094a [rubygems/rubygems] Fix spec to not touch the network
And not depend on the state of rack's master branch, in particular, on
their Ruby support range.

https://github.com/rubygems/rubygems/commit/9ea4baffac
2022-01-25 22:12:33 +09:00
David Rodríguez cd806e19b7 [rubygems/rubygems] Remove unnecessary comment
https://github.com/rubygems/rubygems/commit/ef4e5c6169
2022-01-25 22:12:33 +09:00
Kazuhiro NISHIYAMA bb955096d8
Fix a typo [ci skip] 2022-01-23 21:56:39 +09:00
Yusuke Nakamura 7353f950c3 [rubygems/rubygems] Change generated namespaced test class name in minitest
* `foo` => `TestFoo`
* `foo_bar` => `TestFooBar`
* `foo-bar` => `Foo::TestBar`

https://github.com/rubygems/rubygems/commit/353cdd61c3
2022-01-20 01:04:53 +09:00
Yusuke Nakamura 26e0450ba9 [rubygems/rubygems] Add spec to class name definition in newgem spec
https://github.com/rubygems/rubygems/commit/5f698fc4a0
2022-01-20 01:04:53 +09:00
Yusuke Nakamura 4451313252 [rubygems/rubygems] Update generated minitest file style
foo     => test/test_foo.rb
foo-bar => test/foo/test_bar.rb
foo_bar => test/test_foo_bar.rb

https://github.com/rubygems/rubygems/commit/c795e5d40d
2022-01-20 01:04:52 +09:00
Yusuke Nakamura 4e955b2e37 [rubygems/rubygems] Create minitest file to underscored path in "bundle gem" command
...with dashed gem name

In "bundle gem" command with dashed name gem (e.g. foo-bar) generates
`test/test_foo/bar.rb`, but this file contains undefined class `TestFoo`
and moreover, does not include in "bundle exec rake test" target.

Therefore, intentially the first test after gem created is fail, but in
case of gem name contains dash character is not.

The change doings...
(when "bundle gem foo-bar" called)

* create `test/test_foo_bar.rb`
* define `TestFooBar` class in `test/test_foo_bar.rb`

https://github.com/rubygems/rubygems/commit/5d9a69fc0f
2022-01-20 01:04:52 +09:00
Hiroshi SHIBATA d22511fd75 Merge rubygems/rubygems HEAD.
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
2022-01-19 15:01:44 +09:00
David Rodríguez e7249294fb
[rubygems/rubygems] Fix regression with old marshaled specs having null required_rubygems_version
https://github.com/rubygems/rubygems/commit/91f07a0208
2022-01-19 11:20:36 +09:00
David Rodríguez 39c36a5cf4
[rubygems/rubygems] Fix skipped spec on Windows
https://github.com/rubygems/rubygems/commit/bf0f4b98ee
2022-01-19 11:20:36 +09:00
Kazuhiro NISHIYAMA 2dc365db79
Fix spec failures on ruby 3.1
Because Module#const_added is ruby 3.2 feature
2022-01-15 13:30:20 +09:00
Jeremy Evans a93cc3e23b Make Hash#shift return nil for empty hash
Fixes [Bug #16908]
2022-01-14 12:17:57 -08:00
Jeremy Evans ca3d405242 Fix constant assignment evaluation order
Previously, the right hand side was always evaluated before the
left hand side for constant assignments.  For the following:

```ruby
lhs::C = rhs
```

rhs was evaluated before lhs, which is inconsistant with attribute
assignment (lhs.m = rhs), and apparently also does not conform to
JIS 3017:2013 11.4.2.2.3.

Fix this by changing evaluation order.  Previously, the above
compiled to:

```
0000 putself                                                          (   1)[Li]
0001 opt_send_without_block                 <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 dup
0004 putself
0005 opt_send_without_block                 <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0007 setconstant                            :C
0009 leave
```

After this change:

```
0000 putself                                                          (   1)[Li]
0001 opt_send_without_block                 <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 putself
0004 opt_send_without_block                 <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0006 swap
0007 topn                                   1
0009 swap
0010 setconstant                            :C
0012 leave
```

Note that if expr is not a module/class, then a TypeError is not
raised until after the evaluation of rhs.  This is because that
error is raised by setconstant.  If we wanted to raise TypeError
before evaluation of rhs, we would have to add a VM instruction
for calling vm_check_if_namespace.

Changing assignment order for single assignments caused problems
in the multiple assignment code, revealing that the issue also
affected multiple assignment.  Fix the multiple assignment code
so left-to-right evaluation also works for constant assignments.

Do some refactoring of the multiple assignment code to reduce
duplication after adding support for constants. Rename struct
masgn_attrasgn to masgn_lhs_node, since it now handles both
constants and attributes. Add add_masgn_lhs_node static function
for adding data for lhs attribute and constant setting.

Fixes [Bug #15928]
2022-01-14 11:00:26 -08:00
Jean Boussier 8d05047d72 Add a Module#const_added callback
[Feature #17881]

Works similarly to `method_added` but for constants.

```ruby
Foo::BAR = 42 # call Foo.const_added(:FOO)
class Foo::Baz; end # call Foo.const_added(:Baz)
Foo.autoload(:Something, "path") # call Foo.const_added(:Something)
```
2022-01-14 11:30:07 +01:00
Vyacheslav Alexeev d0a0637948 [rubygems/rubygems] Use `Fiddle` in `bundle doctor` to check for dynamic library presence
https://github.com/rubygems/rubygems/commit/ecd495ce1b
2022-01-13 18:16:05 +09:00
Benoit Daloze 4053e8ba0d Update to ruby/spec@226cfdc 2022-01-10 16:29:54 +01:00
Benoit Daloze 8abfc10605 Update to ruby/mspec@3ea3d32 2022-01-10 16:29:53 +01:00
Kazuhiro NISHIYAMA 5e7cd480f9
Fix spec failure on ruby 3.1
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released.

13241b71a5 did not fix proc spec yet.

https://github.com/ruby/actions/runs/4718820699?check_suite_focus=true#step:18:173
```
  1)
  Proc#parameters adds * rest arg for "star" argument FAILED
  Expected [[:req, :x], [:rest]] == [[:req, :x], [:rest, :*]]
  to be truthy but was false
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:85:in `block (3 levels) in <top (required)>'
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `<top (required)>'
```
2022-01-06 10:14:11 +09:00
Jeremy Evans 791343b5bb Remove Refinement#{extend_object,append_features,prepend_features}
Also make include, prepend, and extend raise a TypeError if one
of the modules is a refinement.

Implements [Feature #18270]
2022-01-05 10:59:03 -08:00
Kazuhiro NISHIYAMA 13241b71a5
Fix failures on ruby 3.1
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released.

https://github.com/ruby/actions/runs/4705986643?check_suite_focus=true#step:18:144
```
  1)
  Method#parameters adds * rest arg for "star" argument FAILED
  Expected [[:rest]] == [[:rest, :*]]
  to be truthy but was false
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/method/parameters_spec.rb:228:in `block (3 levels) in <top (required)>'
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/method/parameters_spec.rb:4:in `<top (required)>'

  2)
  Proc#parameters adds * rest arg for "star" argument FAILED
  Expected [[:req, :x], [:rest]] == [[:req, :x], [:rest, :*]]
  to be truthy but was false
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:85:in `block (3 levels) in <top (required)>'
  /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `<top (required)>'
```
2022-01-05 08:18:47 +09:00
Nobuyoshi Nakada 5074aa1984 [rubygems/rubygems] Test the actual checksums of the mock gems
https://github.com/rubygems/rubygems/commit/2b42630959
2022-01-04 14:59:18 +09:00
Nobuyoshi Nakada 0bfb406b75 [rubygems/rubygems] Fix the test to use the mock gem path
"NUL.*" means the NUL device on Windows, as well as mere "NUL",
and no data is read.

https://github.com/rubygems/rubygems/commit/e2c7d22745
2022-01-04 14:59:17 +09:00
Nobuyoshi Nakada 8f9623741a [rubygems/rubygems] Append a newline to the checksum file
https://github.com/rubygems/rubygems/commit/48ea2778e9
2022-01-04 14:59:17 +09:00
Nobuyoshi Nakada c2e8e1f6a4 [rubygems/rubygems] Fix checksum
Calculate the checksum of the content, not the given pathname at
the build time itself.

https://github.com/rubygems/rubygems/commit/b60ee97ee9
2022-01-04 14:59:16 +09:00
卜部昌平 980bf94f02
Kernel#=~: delete
Has been deprecated since ebff9dc10e.
2022-01-03 22:33:38 +09:00
Nobuyoshi Nakada fae0b66431 Remove deprecated Random::DEFAULT [Feature #17351] 2022-01-01 18:55:52 +09:00
Nobuyoshi Nakada 84891bffe8 Remove unnecessary Random::DEFAULT expectations
The respond_to expectation just suffice as duck-typing.
2022-01-01 18:55:52 +09:00
Jeremy Evans f53dfab95c Add support for anonymous rest and keyword rest argument forwarding
This allows for the following syntax:

```ruby
def foo(*)
  bar(*)
end
def baz(**)
  quux(**)
end
```

This is a natural addition after the introduction of anonymous
block forwarding.  Anonymous rest and keyword rest arguments were
already supported in method parameters, this just allows them to
be used as arguments to other methods.  The same advantages of
anonymous block forwarding apply to rest and keyword rest argument
forwarding.

This has some minor changes to #parameters output.  Now, instead
of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`.
These were already used for `...` forwarding, so I think it makes
it more consistent to include them in other cases.  If we want to
use `[:rest], [:keyrest]` in both cases, that is also possible.

I don't think the previous behavior of `[:rest], [:keyrest]` in
the non-... case and `[:rest, :*], [:keyrest, :**]` in the ...
case makes sense, but if we did want that behavior, we'll have to
make more substantial changes, such as using a different ID in the
... forwarding case.

Implements [Feature #18351]
2021-12-30 14:37:42 -08:00
David Rodríguez 1954a95f8b [rubygems/rubygems] Better way to join path components
The current way works, but error messages show duplicate "/" in paths,
which is weird.

https://github.com/rubygems/rubygems/commit/9123deb4fa
2021-12-30 07:02:30 +09:00
Nobuyoshi Nakada 0a47896d20 s/an Bignum/a Bignum/ [ci skip] 2021-12-28 18:35:03 +09:00
Nobuyoshi Nakada 40e7aefeba Remove obsolete Fixnum and Bignum 2021-12-28 18:35:03 +09:00
Takashi Kokubun 3cd1731920
Skip testing --enable-all in MinGW for now
If we don't intend to support this platform, we should probably enable
MJIT for MinGW. However, since the code for https://bugs.ruby-lang.org/issues/18439
is in place, I'm adjusting the test for it in the meantime.

following up https://github.com/ruby/ruby/pull/5363
2021-12-27 22:30:34 -08:00
David Rodríguez 95d2e06c2b [rubygems/rubygems] Fix `bundle update --bundler` no longer updating lockfile
https://github.com/rubygems/rubygems/commit/a053b7e4d4
2021-12-28 04:38:31 +09:00
David Rodríguez ebb4044dec [rubygems/rubygems] Run `bundle install` in verbose mode
To see if we get more information when this fails.

https://github.com/rubygems/rubygems/commit/853d33fdc3
2021-12-27 21:32:32 +09:00
Hiroshi SHIBATA d6311cb1ca Track RubyGems 3.4.0dev and Bundler 2.4.0dev 2021-12-27 10:45:36 +09:00
David Rodríguez b7e5ce08ff [rubygems/rubygems] Don't add verbose flag so opaquely for realworld specs
https://github.com/rubygems/rubygems/commit/fa8455ef7c
2021-12-27 10:45:36 +09:00
David Rodríguez fb0737654c [rubygems/rubygems] Move setup to the spec that uses it
https://github.com/rubygems/rubygems/commit/7cf0a8fa8e
2021-12-27 10:45:36 +09:00
David Rodríguez 810c1b88ca [rubygems/rubygems] Remove unused include
https://github.com/rubygems/rubygems/commit/a581a1dd50
2021-12-27 10:45:36 +09:00
David Rodríguez 03903f23c2 [rubygems/rubygems] Remove the rest of the `RUBY_VERSION` monkeypatching
Since we're at it. This generates a bunch of warnings and seems like a
brittle way to test things, so let's get rid of it.

https://github.com/rubygems/rubygems/commit/f5d45520e0
2021-12-27 10:45:36 +09:00
David Rodríguez ca3a2e46e8 [rubygems/rubygems] Update some specs to pass ruby-head CI
These specs were monkeypatching `RUBY_VERSION`, but that obviously
doesn't change the running ruby to behave any different.

The removal of some features, in particular, `String#untaint`, made
these specs fail, because untaint is no longer available under ruby-core
and bundler calls `untaint` when `RUBY_VERSION` is less than "2.7",
which these specs were overwriting it to be.

Rewrite these specs to not overwrite `RUBY_VERSION`, but still test the
same things.

https://github.com/rubygems/rubygems/commit/e8c7b92901
2021-12-27 10:45:36 +09:00
Nobuyoshi Nakada abad017354
Postpone fix of lookbehind with ss characters tentatively 2021-12-26 23:28:54 +09:00
Nobuyoshi Nakada 69f03c864e
Remove Refinement#include and Refinement#prepend 2021-12-26 23:28:54 +09:00
Nobuyoshi Nakada 39bc5de833
Remove tainted and trusted features
Already these had been announced to be removed in 3.2.
2021-12-26 23:28:54 +09:00
Hiroshi SHIBATA da6a5e3ed1 Merge RubyGems-3.3.3 and Bundler-2.3.3 2021-12-25 07:40:52 +09:00
Hiroshi SHIBATA b0ad6cb371 Merge RubyGems-3.3.2 and Bundler-2.3.2 2021-12-24 10:35:31 +09:00
Hiroshi SHIBATA fb1ab27f53 Merge RubyGems-3.3.1 and Bundler-2.3.1 2021-12-23 09:44:45 +09:00
Hiroshi SHIBATA fff9b45fa9
Reverts the accidental commits for rubygems/bundler.
We stay to the stable version for releasing Ruby 3.1.0.

  Revert commits:
    b86a7ba492
    ef973aa7aa
2021-12-22 07:52:59 +09:00
David Rodríguez b86a7ba492 [rubygems/rubygems] Fix error when gem specified twice in gemfile under different platforms
https://github.com/rubygems/rubygems/commit/83bc87ca98
2021-12-22 03:12:57 +09:00
David Rodríguez ef973aa7aa [rubygems/rubygems] These commands shouldn't be failing, just warning
https://github.com/rubygems/rubygems/commit/04b1ac72b9
2021-12-22 03:12:56 +09:00
Hiroshi SHIBATA 69dc2ea465 Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +09:00
David Rodríguez 7bd25b9753 [rubygems/rubygems] Print warning when running potentially problematic rubygems + ruby combinations
https://github.com/rubygems/rubygems/commit/d6df0b7de0

Co-authored-by: André Arko <andre@arko.net>
2021-12-21 06:48:27 +09:00
David Rodríguez 01f95ede0e [rubygems/rubygems] Rename `BUNDLE_SPEC_RUN` environment variable
The `BUNDLE_` prefix should be reserved to first class settings that
should be listed when running `bundle config`. This one is just a hacky
environment variable that has not corresponding documented setting.

https://github.com/rubygems/rubygems/commit/7e255c5058
2021-12-21 06:48:27 +09:00
Jeremy Evans 3bd5f27f73 Remove Class#descendants 2021-12-20 11:02:15 -08:00
David Rodríguez 72db2e00d4 [rubygems/rubygems] Error tracing should be printed to stderr
https://github.com/rubygems/rubygems/commit/23178f7d7b
2021-12-20 06:49:49 +09:00
Koichi Sasada 45de4025f5 skip -v spec on MJIT
fix this failure:

```
configure ... cppflags=-DMJIT_FORCE_ENABLE
...
make test-spec

1)
The -v command line option when used alone prints version and ends FAILED
Expected
"ruby 3.1.0dev (2021-12-18T10:10:42Z master 78c175280b) +MJIT [x86_64-linux]
"
to include "ruby 3.1.0dev (2021-12-18T10:10:42Z master 78c175280b) [x86_64-linux]"
/tmp/ruby/v3/src/trunk-mjit-wait/spec/ruby/command_line/dash_v_spec.rb:9:in `block (3 levels) in <top (required)>'
/tmp/ruby/v3/src/trunk-mjit-wait/spec/ruby/command_line/dash_v_spec.rb:4:in `<top (required)>'
```

http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3759943
2021-12-19 01:07:02 +09:00
David Rodríguez 8d29d1292b [rubygems/rubygems] Improve errors a bit more
https://github.com/rubygems/rubygems/commit/f481e8f41a
2021-12-17 16:35:20 +09:00
David Rodríguez 1537471871 [rubygems/rubygems] Share gem not found logic with transitive dependencies too
https://github.com/rubygems/rubygems/commit/e4a1a9663d
2021-12-17 16:35:20 +09:00
David Rodríguez 79f72a4540 [rubygems/rubygems] Fix crash when no matching variants are found for the current platform
If we are resolving a dependency against a particular platform, and
there are no platform specific variants of the candidates that match
that platform, we should not consider those candidates.

https://github.com/rubygems/rubygems/commit/f6077fe27d
2021-12-17 16:35:18 +09:00
David Rodríguez af4b4fd19b [rubygems/rubygems] Improve resolver error messages
Use a more standard naming for gems.

https://github.com/rubygems/rubygems/commit/75121e83f1
2021-12-17 16:35:17 +09:00
Nobuyoshi Nakada 32ee6f80ee Restore the global random seed 2021-12-16 17:44:12 +09:00
Nobuyoshi Nakada 6c87f8fc29 Fix Kernel#srand and Kernel#rand descriptions [ci skip]
Actually used methods are all instance method, not the singleton
method.
2021-12-16 17:44:12 +09:00
Nobuyoshi Nakada 18fef09a02 Refine wording about the default random seed [ci skip] 2021-12-16 17:44:12 +09:00
Nobuyoshi Nakada 69a7eaae38
Use `to_s` and `puts` in tests
`to_s` has the explict specification while `inspect` is often
vague.
2021-12-16 15:12:12 +09:00
Hiroshi SHIBATA 7e084ed707 Merge RubyGems and Bundler master
Merge from 793ad95ecb
2021-12-15 18:05:18 +09:00
Takashi Kokubun 1a63468831
Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
Vyacheslav Alexeev 1a62a50c4f [rubygems/rubygems] Add `github` and `ref` options to `bundle add`
https://github.com/rubygems/rubygems/commit/c3e54acab0
2021-12-11 00:13:25 +09:00
David Rodríguez 0e60bc118b [rubygems/rubygems] Ignore dependencies not actually locked from frozen check
Only needed if there can be no explicit global source (bundler < 3).

https://github.com/rubygems/rubygems/commit/73923f4af5
2021-12-10 19:09:55 +09:00
Kazuhiro NISHIYAMA af6e088357
Skip bind port 1 when ip_unprivileged_port_start<=1
Linux can allow to bind port 1 to user.
And `ip_unprivileged_port_start` is 0 on [lima](https://github.com/lima-vm/lima) default vm.

```
1)
Socket#bind on SOCK_DGRAM socket raises Errno::EACCES when the current user does not have permission to bind FAILED
Expected Errno::EACCES but no exception was raised (0 was returned)
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:38:in `block (4 levels) in <top (required)>'
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:4:in `<top (required)>'

2)
Socket#bind on SOCK_STREAM socket raises Errno::EACCES when the current user does not have permission to bind FAILED
Expected Errno::EACCES but no exception was raised (0 was returned)
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:79:in `block (4 levels) in <top (required)>'
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:44:in `<top (required)>'

3)
Socket#bind using IPv4 using a packed socket address raises Errno::EACCES when the user is not allowed to bind to the port FAILED
Expected Errno::EACCES but no exception was raised (0 was returned)
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:119:in `block (6 levels) in <top (required)>'
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:85:in `<top (required)>'

4)
Socket#bind using IPv6 using a packed socket address raises Errno::EACCES when the user is not allowed to bind to the port FAILED
Expected Errno::EACCES but no exception was raised (0 was returned)
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:119:in `block (6 levels) in <top (required)>'
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:85:in `<top (required)>'
```
2021-12-08 13:26:53 +09:00
David Rodríguez f0ef9ffed1 [rubygems/rubygems] Cancel deprecation of custom git sources
https://github.com/rubygems/rubygems/commit/99cd6e0627
2021-12-08 07:59:34 +09:00
Simon Fish 1b12ebb94e [rubygems/rubygems] Add require parameter to `bundle add``
Test and ensure "false" is handled

Don't use yield_self to operate on autorequire

Remove duplicate autorequire

Add banner to require option

Don't use json to break down require params

Pass linter

https://github.com/rubygems/rubygems/commit/a4f2f8ac17
2021-12-08 01:49:20 +09:00
David Rodríguez 26303c31f0 [rubygems/rubygems] Pass "--" to git commands to separate positional and optional args
To make sure git uri's specified in Gemfile are never misinterpreted as
optional arguments, potentially allowing for local code execution.

https://github.com/rubygems/rubygems/commit/90b1ed8b9f
2021-12-07 23:27:59 +09:00
David Rodríguez 526c9359ca [rubygems/rubygems] Don't cleanup paths from gems already activated from `$LOAD_PATH`
This way, if some default gem has been required before bundler, and
rubygems has enhanced the `$LOAD_PATH` to use the latest version in the
system, further requires of that default gem after bundler has been
activated will use the same version and don't cause redefinition
warnings or worse problems derived from the fact of mixing up two
different versions. That, unless the gem is a `Gemfile` dependency. In
that case, we'll get a mismatch error anyways as we do now.

This fix doesn't mean that all default gems internally used by
bundler/rubygems are now supported inside `Gemfile`'s. That should be
handled case by case, but it will now bite people only when they try to
add the gem to their `Gemfile`, not before.

https://github.com/rubygems/rubygems/commit/7325530547
2021-12-07 01:53:39 +09:00
Jean Boussier 715a51a0d6 [rubygems/rubygems] Feature: accept pull request URLs as github source
Very often github source is used to temporarily use a modified gem
while a PR upstream is being reviewed.

So for instance https://github.com/ruby/bigdecimal/pull/211 will look like:

```ruby
gem "bigdecimal", github: "casperisfine/bigdecimal", branch: "git-gem" # https://github.com/ruby/bigdecimal/pull/200
```

It's annoying because you have to fiddle with the branch name, which is copied as `casperisfine:git-gem`, etc etc.

If I could simply use the PR URL like this:

```
gem "bigdecimal", github: "https://github.com/ruby/bigdecimal/pull/211"
```

It would make a very common task for me so much simpler.

https://github.com/rubygems/rubygems/commit/517c527751
2021-12-06 20:27:29 +09:00
Josef Šimánek 25423f0918 [rubygems/rubygems] Add --version parameter to bundle info command.
https://github.com/rubygems/rubygems/commit/7d9fdd908d
2021-12-06 18:03:54 +09:00
David Rodríguez c38c1d82b1 [rubygems/rubygems] Let original EACCES error be raised
This block of code already wraps file operations with
`SharedHelpers.filesystem_access`, which rescues and re-raises more
friendly errors. Also, I'm not fully sure creating a temporary directory
can end up raising an `Errno::EACCES` error from reading `tmpdir`
sources. Finally, this rescue block apparently leads to some false
positives when firewall is blocking the ruby executable on Windows, or
at least that's what we've got reported.

In any case, I think it's best to let the original error be raised.

https://github.com/rubygems/rubygems/commit/f7dbe54404
2021-12-04 05:18:11 +09:00
David Rodríguez 4c5e862434 [rubygems/rubygems] Improve source gemfile/lockfile equivalence checks
Since we no longer have multiple global sources, each top level dependency is
always pinned to a single source, so it makes little sense to talk about
adding or removing a source. Instead, source changes always mean to
change the source one or more dependencies are pinned to. This logic can
now be much simpler.

https://github.com/rubygems/rubygems/commit/f1d33fa0df
2021-12-03 20:00:51 +09:00
David Rodríguez 248fae0ec4 [rubygems/rubygems] Improve sources representation
We have two representations of a source. Once used for sorting, which
should not depend on the source's state, but solely on its static
information, like remotes. Another one used for error and informational
messages, which should properly inform about the exact state of the
source when the message is printed.

This commit makes the latter be the default implementation of `to_s`, so
that error and informational messages are more accurate by default.

https://github.com/rubygems/rubygems/commit/b5f2b88957
2021-12-03 20:00:50 +09:00
David Rodríguez 7d974cc56f [rubygems/rubygems] Don't overwrite locked dependency sources too early
Otherwise we hide some useful message about dependency source changes.

https://github.com/rubygems/rubygems/commit/c926673c5b
2021-12-03 20:00:50 +09:00
David Rodríguez aa87780f8f [rubygems/rubygems] Fix incorrect order in changed sources message
https://github.com/rubygems/rubygems/commit/6f1b5f68de
2021-12-03 20:00:49 +09:00
David Rodríguez cf88271331 [rubygems/rubygems] Fix gemspec source unlocking also for prereleases like 0.0.0.SNAPSHOT
The default prerelease requirement in rubygems doesn't actually match
things like "0.0.0.SNAPSHOT".

https://github.com/rubygems/rubygems/commit/711498b342
2021-12-02 18:10:31 +09:00
David Rodríguez 2a15b28a9e [rubygems/rubygems] Fix materialization of locked 0 prereleases
Since the default requirement in rubygems is ">= 0", it was failing to
match 0 prereleases. Changing the default globally to be ">= 0.a"
instead is a major refactoring that's quite tricky to make backwards
compatible, so I'm special casing this where needed for now to fix the
regression.

https://github.com/rubygems/rubygems/commit/68fe37937c
2021-12-02 18:10:31 +09:00
Nobuyoshi Nakada a84dc9d80d [win32] skip example about STDIN encodings 2021-12-01 18:54:26 +09:00
Hiroshi SHIBATA 0b53a8895f
Merge rubygems master fd676ac464491afaa0baf5435cb11b3f86229cbd 2021-12-01 11:00:10 +09:00
Hiroshi SHIBATA 9f4bdeb403
Removed vcr files. They are needless for this repo 2021-12-01 09:53:07 +09:00
Nobuyoshi Nakada ac8647bec1
Fix `GC.total_time` example
The result may increase actually or not, since GC can finish
shorter than the timer granularity.
2021-11-30 08:49:41 +09:00
ooooooo-q af59d35570 [rubygems/rubygems] Fix escape of filenames in `bundle doctor`
https://github.com/rubygems/rubygems/commit/3ede1435ea
2021-11-30 01:29:34 +09:00
Benoit Daloze 67a1e22589 Update to ruby/spec@7f22a0b 2021-11-29 15:50:28 +01:00
Benoit Daloze e6d93a27af Update to ruby/mspec@098b320 2021-11-29 15:50:26 +01:00
David Rodríguez 59439446d9 [rubygems/rubygems] Fix missing locked specs when depended on other platform
https://github.com/rubygems/rubygems/commit/0396e899db
2021-11-27 05:31:54 +09:00
David Rodríguez f3320f164f [rubygems/rubygems] Fix `bundle info` sometimes claiming that bundler has been deleted
https://github.com/rubygems/rubygems/commit/fe1a31db31
2021-11-26 08:50:52 +09:00
David Rodríguez aace9cb162 [rubygems/rubygems] Fix bad instance variable name
Recent changes made a warning while running specs show up for some
reason, and it revealed this error.

https://github.com/rubygems/rubygems/commit/bbf55de38e
2021-11-25 04:02:21 +09:00
David Rodríguez b2b473707f [rubygems/rubygems] Check not having load system features also for successful runs
https://github.com/rubygems/rubygems/commit/4807bd19a5
2021-11-25 04:02:21 +09:00
David Rodríguez d49ee9e2c3 [rubygems/rubygems] These method should be returning a string
https://github.com/rubygems/rubygems/commit/dc391f4d87
2021-11-25 04:02:20 +09:00
David Rodríguez d123919595 [rubygems/rubygems] We should be checking raised exception, not status code here
https://github.com/rubygems/rubygems/commit/48f8cdab9c
2021-11-25 04:02:20 +09:00
David Rodríguez c4b1aa19a3 [rubygems/rubygems] Don't replace ENV twice on non Windows platforms
https://github.com/rubygems/rubygems/commit/8dc86b7096
2021-11-25 04:02:19 +09:00
Jean Boussier c0c2b31a35 Add Class#subclasses
Implements [Feature #18273]

Returns an array containing the receiver's direct subclasses without
singleton classes.
2021-11-23 10:50:44 +01:00
David Rodríguez 997adfd410 [rubygems/rubygems] Clarify `bundle viz` deprecation
https://github.com/rubygems/rubygems/commit/7f22fe56b3
2021-11-22 09:29:13 +09:00
David Rodríguez 80f39d78df [rubygems/rubygems] Allow `bundle update` to downgrade gems by changing the Gemfile
https://github.com/rubygems/rubygems/commit/6a19cca7e5
2021-11-19 10:12:10 +09:00
Jeremy Evans 75ecbda438 Make Module#{public,private,protected,module_function} return arguments
Previously, each of these methods returned self, but it is
more useful to return arguments, to allow for simpler method
decorators, such as:

```ruby
cached private def foo; some_long_calculation; end
```

Where cached sets up caching for the method.

For each of these methods, the following behavior is used:

1) No arguments returns nil
2) Single argument is returned
3) Multiple arguments are returned as an array

The single argument case is really the case we are trying to
optimize for, for the same reason that def was changed to return
a symbol for the method.

Idea and initial patch from Herwin Quarantainenet.

Implements [Feature #12495]
2021-11-18 09:47:40 -08:00
Nobuyoshi Nakada 89b440bf72
Expect bool as `sort:` option at glob [Feature #18287] 2021-11-18 21:47:18 +09:00
Yusuke Endoh 8a816fbe7b Revert "Temporary ignored the failing specs for Date"
This reverts commit 17e64cca6b.

The specs should work now.
2021-11-16 23:01:54 +09:00
Hiroshi SHIBATA 17e64cca6b
Temporary ignored the failing specs for Date 2021-11-16 21:22:28 +09:00
Hiroshi SHIBATA f3bda8987e
Merge the master branch of rubygems repo
Picked from 4b498709a0
2021-11-16 20:19:13 +09:00
David Rodríguez 3cf7130d70 [rubygems/rubygems] Remove duplicated spec
https://github.com/rubygems/rubygems/commit/86b874ed24
2021-11-12 06:05:09 +09:00
David Rodríguez 4736dec58b [rubygems/rubygems] Remove `gemfile_should_be` helper as well
https://github.com/rubygems/rubygems/commit/79f3c00caa
2021-11-12 06:05:08 +09:00
David Rodríguez 1f91009d24 [rubygems/rubygems] Remove `have_lockfile` matcher too
https://github.com/rubygems/rubygems/commit/635f3f2605
2021-11-12 06:05:08 +09:00
David Rodríguez d0f266460f [rubygems/rubygems] Remove `lockfile_should_be` helper
It doesn't add anything.

https://github.com/rubygems/rubygems/commit/ece3c864df
2021-11-12 06:05:07 +09:00
Hiroshi SHIBATA bd2674ad33 [rubygems/rubygems] Use bundler-graph instead of bundler-viz
https://github.com/rubygems/rubygems/commit/a54cca13db
2021-11-08 22:15:21 +09:00
haruuzion 82ae9b092c [rubygems/rubygems] Fix url
https://github.com/rubygems/rubygems/commit/6a5a80eff7
2021-11-06 01:39:24 +09:00
Nobuyoshi Nakada 539c42ed89 [rubygems/rubygems] Fix typos
https://github.com/rubygems/rubygems/commit/f328ef6f77
2021-11-04 23:06:25 +09:00
Nobuyoshi Nakada a202408180
Fix typos 2021-11-02 19:17:37 +09:00
David Rodríguez ed0f326e88 [rubygems/rubygems] Leave ":" after MANPATH when not set
So that system man pages still work after a gem with man pages overrides
it.

https://github.com/rubygems/rubygems/commit/1031879b87
2021-11-02 00:28:28 +09:00
David Rodríguez 4e7e057692 [rubygems/rubygems] Memoize materialized specs when requiring `bundler/setup`
Calling `Bundler.definition.specs` will memoize materialized specs.
However, requiring `bundler/setup` will end up materializing the same
set of specs, but not memoize them.

This change makes things consistent.

https://github.com/rubygems/rubygems/commit/e4c2b52824
2021-11-01 02:01:36 +09:00
David Rodríguez f634d1ee00 [rubygems/rubygems] Better error when installing a git lockfile and git not present
https://github.com/rubygems/rubygems/commit/28f4842196
2021-10-30 06:11:39 +09:00
Benoit Daloze a954f273a8 Cleanup GC.auto_compact spec
* Make the supported check more obvious.
2021-10-29 21:59:35 +02:00
Benoit Daloze 800dad6297 Skip GC.auto_compact= spec for platforms not supporting it
* See https://github.com/ruby/spec/pull/891
2021-10-29 21:54:17 +02:00
Josef Šimánek 71b370f6dd
[rubygems/rubygems] Enforce bundler platform (and default gem) to keep invalid gemspec test compatible with ruby-trunk.
https://github.com/rubygems/rubygems/commit/a77061d4e9
2021-10-29 18:00:47 +09:00
Josef Šimánek 9b7afd3cff
[rubygems/rubygems] Update mirror_probe realword specs to not rely exactly at raised HTTP exception.
- this exception differs across Ruby versions.

https://github.com/rubygems/rubygems/commit/38c6927a5f
2021-10-29 18:00:47 +09:00
Josef Šimánek 0029e0948a
[rubygems/rubygems] Install stringio for standalone spec.
- previously it was required already by net/http, but it is not anymore using ruby-trunk
- 996d18a43f
- 364044e090 (diff-a1d29a94def02829fd4f9ba591199acf079e028f5a2002a77c363eb01212e112)

https://github.com/rubygems/rubygems/commit/be1779655a
2021-10-29 18:00:46 +09:00
Josef Šimánek b179166421
[rubygems/rubygems] Assert NoMethodError message only partialy in downloader_spec.
- latest ruby adds error_highlight gem introducing backtrace into exception message

https://github.com/rubygems/rubygems/commit/08c70f9dd0
2021-10-29 18:00:46 +09:00
Josef Šimánek fd17ae8205
[rubygems/rubygems] Lock racc version in platform_spec.
- latest ruby is shipped with racc 1.6 making this spec failing
- this spec is related to platform locking, changing version should not do any harm

https://github.com/rubygems/rubygems/commit/3e18b626cb
2021-10-29 18:00:46 +09:00
Frederik Dudzik f45af5f0a4
Support gemification of tsort
Co-authored-by: Frederik Dudzik <frederik.dudzik@shopify.com>
Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2021-10-29 17:32:52 +09:00
Josef Šimánek a9be84db82 [rubygems/rubygems] Add new default gems to setup_spec exempts.
- error_highlight was introduced at e946049665
  orriginally as error_squiggle later renamed at 9438c99590

- ruby2_keywords was introduced as a placeholder gem only at 21d2463fbc

https://github.com/rubygems/rubygems/commit/c9ebe7c7d2
2021-10-29 17:22:25 +09:00
David Rodríguez 79f9053599 [rubygems/rubygems] Unskip inline spec that can pass now on the latest rubies
https://github.com/rubygems/rubygems/commit/a81d4421b4
2021-10-29 17:13:18 +09:00
Frederik Dudzik 2a90ad7aa5 [rubygems/rubygems] use Rubocop Lint/Debugger check rather than custom spec
We have a quality spec that check for debugger statements. Rubocop has a
cop that tests for the same thing. As such it makes sense to remove the
spec and activate the cop.

https://github.com/rubygems/rubygems/commit/dc1eb6eec5
2021-10-29 17:13:03 +09:00
Alan Wu e53d07f583 Rename ::YJIT to RubyVM::YJIT
Since the YJIT Ruby module is CRuby specific and not meant for general
use, it should live under RubyVM instead of at top level.
2021-10-28 13:43:02 -04:00
Benoit Daloze c75df796d8 Update to ruby/spec@21a48d9 2021-10-28 18:54:01 +02:00
David Rodríguez ed5f8eaf49 [rubygems/rubygems] Don't warn when a lockfile is locked to a dev version
Even if it's newer than the running versions. Dev versions are not
released to rubygems.org, so the warning message suggests a command that
doesn't work. And dev versions are currently non deterministic
(2.3.0.dev can be many different versions), so the warning doesn't
really make sense at the moment.

https://github.com/rubygems/rubygems/commit/6f31af27ef
2021-10-27 14:47:21 +09:00
Jean Boussier e5319dc985 pack.c: add an offset argument to unpack and unpack1
[Feature #18254]

This is useful to avoid repeteadly copying strings when parsing binary formats
2021-10-26 22:27:30 +02:00
Jeremy Evans 717ab0bb2e
Add Class#descendants
Doesn't include receiver or singleton classes.

Implements [Feature #14394]

Co-authored-by: fatkodima <fatkodima123@gmail.com>
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
2021-10-26 12:35:21 -07:00
Peter Zhu a5b6598192 [Feature #18239] Implement VWA for strings
This commit adds support for embedded strings with variable capacity and
uses Variable Width Allocation to allocate strings.
2021-10-25 13:26:23 -04:00
David Rodriguez b4a43e4f57
[rubygems/rubygems] Show proper error when previous installation of gem can't be deleted
Instead of showing the bug report template with an error at a random
place.

https://github.com/rubygems/rubygems/commit/882ad3ab57
2021-10-25 20:48:51 +09:00
David Rodriguez 00412be204
[rubygems/rubygems] Show a proper error if gem path is not writable
Instead of showing the bug report place with an error at a randome
place.

https://github.com/rubygems/rubygems/commit/241854ce73
2021-10-25 20:48:51 +09:00
David Rodriguez f6d1909500
[rubygems/rubygems] Catch up with recent error message modification
https://github.com/rubygems/rubygems/commit/ae374c1f31
2021-10-25 20:48:51 +09:00
David Rodriguez f7f85c1feb
[rubygems/rubygems] Manage global gem cache directly
Previously, it was maintained in sync with the standard cache. That was
less efficient, and it caused some error messages to point to non
existent files.

https://github.com/rubygems/rubygems/commit/931f8cb8a9
2021-10-25 20:48:51 +09:00
David Rodriguez 4edcda67b3
[rubygems/rubygems] Simplify gem downloading inside bundler
We can skip most stuff in `Gem::RemoteFetcher#download`, and use
`Gem::RemoteFetcher#update_cache_path` directly.

This has the benefit of allowing us to remove some workarounds to
support several rubygems versions, but also allows us to pass the target
folder where the gem should be downloaded directly and skip the logic
inside `Gem::RemoteFetcher#download` to infer the cache path. This will
be useful later to fix some issues with the `global_gem_cache` feature
flag.

https://github.com/rubygems/rubygems/commit/8fe74a77e4
2021-10-25 20:48:51 +09:00
David Rodriguez 03a563b47e
[rubygems/rubygems] Remove unused `let`
https://github.com/rubygems/rubygems/commit/7e1316e454
2021-10-25 20:48:51 +09:00