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

10761 Коммитов

Автор SHA1 Сообщение Дата
David Rodríguez a44040c9e4 [rubygems/rubygems] Add notes to make sure we don't forget to backport changes to Bundler
https://github.com/rubygems/rubygems/commit/1ac5b14c78

Co-authored-by: André Arko <andre@arko.net>
2022-10-01 05:46:41 +09:00
David Rodríguez f04d249e83 [rubygems/rubygems] Fix matching of eabihf platforms
https://github.com/rubygems/rubygems/commit/a03d30cd58
2022-10-01 05:46:40 +09:00
David Rodríguez 8252ea2140 [rubygems/rubygems] Fix matching of linux platforms with eabi modifiers
https://github.com/rubygems/rubygems/commit/89362c18ef

Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
2022-10-01 05:46:40 +09:00
David Rodríguez 4d58ee3de0 [rubygems/rubygems] Refactor platform matching on Linux
I think this highlights better how musl is special.

https://github.com/rubygems/rubygems/commit/4075771697
2022-10-01 05:46:39 +09:00
tompng 641310ce37 [ruby/irb] Fix ripper_lex_without_warning duplicated heredoc token
https://github.com/ruby/irb/commit/45b539af39
2022-10-01 04:17:15 +09:00
Jenny Shen 28840d74c2 [rubygems/rubygems] Refine error message to check the push URL instead of just the host
https://github.com/rubygems/rubygems/commit/46990f3292
2022-09-29 17:56:36 +09:00
Jenny Shen 17b783ad9e [rubygems/rubygems] Surface entire redirect uri in permanent redirections
https://github.com/rubygems/rubygems/commit/da7837630b
2022-09-29 17:56:35 +09:00
Jenny Shen 1cbf0fd863 [rubygems/rubygems] Add error message when api response is a permanent redirect
https://github.com/rubygems/rubygems/commit/ccca30c77a

Co-authored-by: Nick Schwaderer <nick.schwaderer@shopify.com>
2022-09-29 17:56:34 +09:00
Jemma Issroff d594a5a8bd
This commit implements the Object Shapes technique in CRuby.
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
2022-09-28 08:26:21 -07:00
Jeremy Evans cd77e71bba [ruby/net-http] Remove ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE
This list is out of date.  At least OpenBSD since 2013 does not
allow one user to read the environment variables of a process
run by another user.

While we could try to keep the list updated, I think it's a bad
idea to not use the user/password from the environment, even if
another user on the system could read it.  If http_proxy exists
in the environment, and other users can read it, it doesn't
make it more secure for Ruby to ignore it.  You could argue that
it encourages poor security practices, but net/http should provide
mechanism, not policy.

Fixes [Bug #18908]

https://github.com/ruby/net-http/commit/1e4585153d
2022-09-28 17:26:03 +09:00
Mike Dalessio 8f7f12ad64 [rubygems/rubygems] fix: Gem::Platform.match handles String argument properly
Previously 9eead86 introduced non-commutativity of platforms, and
later commit 1b9f7f50 changed the behavior of `Gem::Platform.match` to
ensure the callee of `#=~` was the gem platform.

However, when the platform argument is a String, then the callee and
argument of `#=~` are flipped (see docs for `String#=~`), which works
against the fix from 1b9f7f50.

Closes #5938

https://github.com/rubygems/rubygems/commit/3b1fb562e8
2022-09-28 05:55:28 +09:00
Lars Kanis 9d56d9975d [ruby/timeout] Explicit add the timeout thread to default ThreadGroup
Otherwise the timeout thread would be added to the ThreadGroup of the thread that makes the first call to Timeout.timeout .

Fixes bug 19020: https://bugs.ruby-lang.org/issues/19020

Add a test case to make sure the common thread doesn't leak to another ThreadGroup

https://github.com/ruby/timeout/commit/c4f1385c9a
2022-09-28 01:59:35 +09:00
Hiroshi SHIBATA 95d5b33ea0
syntax_suggest moved under the ruby organization from zombocom 2022-09-27 12:44:30 +09:00
Aaron Patterson 06abfa5be6
Revert this until we can figure out WB issues or remove shapes from GC
Revert "* expand tabs. [ci skip]"

This reverts commit 830b5b5c35.

Revert "This commit implements the Object Shapes technique in CRuby."

This reverts commit 9ddfd2ca00.
2022-09-26 16:10:11 -07:00
Jemma Issroff 9ddfd2ca00 This commit implements the Object Shapes technique in CRuby.
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
2022-09-26 09:21:30 -07:00
Samuel Williams 22af2e9084 Rework vm_core to use `int first_lineno` struct member. 2022-09-26 00:41:16 +13:00
Takashi Kokubun 0c9dc01a2a Skip struct fields whose output differs
across different environments
2022-09-23 06:44:28 +09:00
Takashi Kokubun dfc311c0b3 Swap the positions of offsetof and type 2022-09-23 06:44:28 +09:00
Takashi Kokubun 4c6e1556b1 Bindgen immediate types with builtin 2022-09-23 06:44:28 +09:00
Takashi Kokubun 280ff1707e Drop c_64 and c_32 2022-09-23 06:44:28 +09:00
Takashi Kokubun 5cda5938f8 Bindgen enum with builtin 2022-09-23 06:44:28 +09:00
Takashi Kokubun 00c441ce7a Bindgen macro with builtin 2022-09-23 06:44:28 +09:00
Takashi Kokubun f2bea691cd Builtin RubyVM::MJIT::C 2022-09-23 06:44:28 +09:00
Otávio Schwanck dos Santos 696e8914b7 [ruby/reline] PR changes
https://github.com/ruby/reline/commit/e8e8d81f47
2022-09-22 22:28:38 +09:00
Otávio Schwanck dos Santos 9d19d910c0 [ruby/reline] Revert "update version"
This reverts commit https://github.com/ruby/reline/commit/ce1ac86179e6.

https://github.com/ruby/reline/commit/86602cd244
2022-09-22 22:28:37 +09:00
Otávio Schwanck dos Santos 224a3ea718 [ruby/reline] update version
https://github.com/ruby/reline/commit/ce1ac86179
2022-09-22 22:28:37 +09:00
Otávio Schwanck dos Santos 9fb18e6314 [ruby/reline] fix vi-operator-arg
https://github.com/ruby/reline/commit/d42cdb8f91
2022-09-22 22:28:36 +09:00
Hiroshi SHIBATA 928aeef330 [ruby/cgi] Bump up 0.3.3
https://github.com/ruby/cgi/commit/c1ffa3a428
2022-09-22 17:29:55 +09:00
Aaron Patterson ec93d09c94 add rb_execution_context 2022-09-21 22:20:35 -07:00
Aaron Patterson 083b4bb655 add rb_control_frame_t 2022-09-21 22:20:35 -07:00
Takuya Noguchi 830b2e217b [rubygems/rubygems] Update GitLab CI template with new one
GitLab CI now needs the default keyword on specification of image
and before_script.

https://docs.gitlab.com/ee/ci/yaml/#default

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/b79e78e733
2022-09-22 11:42:57 +09:00
tompng 369f1668cd [ruby/irb] Rewrite on_scan proc to be more readable.
https://github.com/ruby/irb/commit/da54e7f081
2022-09-22 00:37:40 +09:00
tompng 9f68687879 [ruby/irb] Scan every single characters in IRB::Color.scan
https://github.com/ruby/irb/commit/d14e56a65d
2022-09-22 00:37:38 +09:00
st0012 6325fc8854 [ruby/irb] Handle non-String $LOAD_PATH values more carefully
In addition to String values, $LOAD_PATH can also take objects that
respond_to the `to_path` method, like Pathname objects. So `irb` should
be able to handle those objects too.

And if $LOAD_PATH contains objects that can't be converted into String,
`irb` should simply ignore it.

https://github.com/ruby/irb/commit/b2f562176b
2022-09-21 22:24:27 +09:00
Nobuyoshi Nakada 6898984f1c
[Bug #19005] dynamic_lookup linker option in external libraries
The warning against `-undefined dynamic_lookup` is just a warning yet,
and many gems seem to pay no attention to warnings.  Until it fails
actually, keep it as a migration path, except for standard extension
libraries and bundled extension gems.
2022-09-17 12:09:34 +09:00
Jeremy Evans b07db96744 [ruby/irb] Support --noscript option to not use first non-option argument as script
Also add --script option to turn the option back on.

Previously there wasn't a way to get an interactive IRB session
and access arguments provided on the command line.

Additionally, handle `-` as script as stdin. In Unix-like tools, `-`
means to take standard input instead of a file.  This doesn't
result in exactly the same output for:

```
echo 'p ARGV' > args.rb; irb args.rb a b c
```

and

```
echo 'p ARGV' | irb - a b c
```

Due to how irb handles whether stdin is a tty.

However, this change allows use of `-` as a argument, instead of
giving an unrecognized switch error. This required some small
changes to context.rb (to handle `-` as standard input) and
input-method.rb (to have FileInputMethod accept IO arguments in
addition to strings).

Implements [Feature #15371]

https://github.com/ruby/irb/commit/4192683ba2
2022-09-17 02:25:26 +09:00
Kevin Newton 68a5b0f086 [rubygems/rubygems] Mask the file mode when extracting files
When extracting files from the tarball, a mode is retrieved from
the header. Occasionally you'll encounter a gem that was packaged
on a system whose permission bits result in a value that is larger
than the value that File.chmod will allow (anything >= 2^16). In
that case the extraction fails with a RangeError, which is pretty
esoteric.

If you extract the tarball with the tar and gunzip utilities, the
file permissions end up being just the bottom 16 bits masked off
from the original value. I've mirrored that behavior here. Per the
tar spec:

> Modes which are not supported by the operating system restoring
> files from the archive will be ignored.

I think that basically means what I've done here.

---

This commit also changes the behavior very slightly with regard to
when the chmod is called. Previously it was called while the file
descriptor was still open, but after the write call.

When write flushes, the file permissions are changed to the mode
value from the File.open call, undoing the changes made by
FileUtils.chmod. CRuby appears to flush the buffer after the
chmod call, whereas TruffleRuby flushes before the chmod call.
So the file permissions can change depending on implementation.
Both implementations end up getting the correct file permissions
for the bottom 9 bits (user, group, world), but differ with
regard to the sticky bit in the next 3.

To get consistent behavior, this commit changes it to close the
file descriptor before attempting to chmod anything, which makes
it consistent because the write flushes in both cases.

https://github.com/rubygems/rubygems/commit/22ce076e99
2022-09-15 14:49:20 +09:00
Nobuyoshi Nakada bf72afa766
Remove warning for old TLS version connection
RubyGems.org already has refused connection requests using older than
TLS 1.2.
2022-09-15 14:48:47 +09:00
Nobuyoshi Nakada f863bc505c [ruby/irb] Fix the error when LC_MESSAGES config value is nil
https://github.com/ruby/irb/commit/6bbde84369
2022-09-14 11:14:08 +09:00
Jeremy Evans 9299db49f5 [ruby/irb] Fix history file saving with concurrent irb sessions when history file doesn't exist
If history file didn't exist when irb was started, @loaded_history_mtime
would be nil.  However, if the history file didn't exist before, but it
exists when saving history, that means the history file was modified,
and we should handle it the same way as we handle the other case where
the history file was modified.

Fixes #388

https://github.com/ruby/irb/commit/8d277aafcb
2022-09-14 10:15:45 +09:00
David Rodríguez 2aa8edaec7 [rubygems/rubygems] Deduplicate results just once
Instead of checking for uniqueness for every spec.

https://github.com/rubygems/rubygems/commit/97d28c9665
2022-09-12 22:13:32 +09:00
David Rodríguez 75d90cc8e5 [rubygems/rubygems] Use a single hash to keep track of prereleases
https://github.com/rubygems/rubygems/commit/9d7bd177b0
2022-09-12 22:13:31 +09:00
David Rodríguez 03d1962703 [rubygems/rubygems] Remove unnecessary sorting
Already done by the gem version promoter.

https://github.com/rubygems/rubygems/commit/aae2cc9fe0
2022-09-12 22:13:30 +09:00
David Rodríguez dce73c8616 [rubygems/rubygems] Simplify instantiating the gem version promoter
https://github.com/rubygems/rubygems/commit/c4e2737f2c
2022-09-12 22:13:30 +09:00
David Rodríguez 6a21d196ba [rubygems/rubygems] Let specs be sorted just once by the gem version promoter
https://github.com/rubygems/rubygems/commit/3cea25a39d
2022-09-12 22:13:29 +09:00
David Rodríguez 8d2bcc88ff [rubygems/rubygems] This sorting seems unnecessary too
https://github.com/rubygems/rubygems/commit/823cb1fef9
2022-09-12 22:13:29 +09:00
David Rodríguez a4860e043e [rubygems/rubygems] Remove unnecessary spec sorting
Specs in a SpecSet with the same name are only sorted by platform
priority when they are read. No need to sort everything eagerly.

https://github.com/rubygems/rubygems/commit/aeafff52df
2022-09-12 22:13:28 +09:00
Takashi Kokubun 472e7b8518
MJIT: Use the built-in PACK_MAP
106744107b made this possible.
2022-09-11 15:39:40 +09:00
David Rodríguez b350053ae4 [rubygems/rubygems] Fix resolution on non-musl platforms
Gems without specific platform were being preferred over matching
platform specific gems.

https://github.com/rubygems/rubygems/commit/37b95b9159
2022-09-09 19:38:52 +09:00
Aaron Patterson 56e5210cde
More robust macro parser (#6343)
I want to use more complicated macros with MJIT.  For example:

```
  # define SHAPE_MASK (((unsigned int)1 << SHAPE_BITS) - 1)
```

This commit adds a simple recursive descent parser that produces an AST
and a small visitor that converts the AST to Ruby.
2022-09-09 15:19:23 +09:00
rm155 78af05ba0f [ruby/forwardable] Freeze VERSION and FORWARDABLE_VERSION to improve Ractor-compliance
https://github.com/ruby/forwardable/commit/c91f41f4fa
2022-09-08 14:31:42 +09:00
rm155 70e6be2b05 [ruby/ipaddr] Improve Ractor-compliance
https://github.com/ruby/ipaddr/commit/73461724e5
2022-09-08 14:09:06 +09:00
David Rodríguez 24fd2f73d0 Resync Bundler & RubyGems 2022-09-08 11:25:03 +09:00
Antonio Paulino 4c1f6750f2 [rubygems/rubygems] Fix: Gem info bug with version flag
https://github.com/rubygems/rubygems/commit/e4cee1f975
2022-09-07 06:18:58 +09:00
Takashi Kokubun 03ae415d50
Fix typo 2022-09-06 16:22:43 +09:00
Takashi Kokubun 3f9125aaba
Update c_32.rb 2022-09-06 16:09:29 +09:00
Takashi Kokubun 4214023309
Run mjit-bindgen again
I'm thinking about Ruby builtin code instead of doing this.
It'll be hopefully more portable and easier because the same C code could
handle both 32bit and 64bit.
2022-09-06 15:59:08 +09:00
Hiroshi SHIBATA 2657d8efb9 [ruby/set] Bump version to 1.0.3
https://github.com/ruby/set/commit/e2419f2d30
2022-09-06 10:41:20 +09:00
Hiroshi SHIBATA 113581d288 [ruby/set] Set version to 1.0.3.dev for fixing rubygems/bundler tests
https://github.com/ruby/set/commit/40dda15d7f
2022-09-05 19:05:45 +09:00
Hiroshi SHIBATA 3eca1e438d Merge 16c3535413 2022-09-05 14:37:12 +09:00
Takashi Kokubun 3767c6a90d
Ruby MJIT (#6028) 2022-09-04 21:53:46 -07:00
Takashi Kokubun 277498e2a2
Attempt to fix test-bundler
f7cf641469 broke spec/bundler/install/gems/resolving_spec.rb:356.
This line seems to impact that test, so I slightly modified the
implementation for that spec's case.
2022-09-04 21:45:13 -07:00
Mike Dalessio 45fe7f7575
[rubygems/rubygems] Feature: `bundle add` supports `--path` option
https://github.com/rubygems/rubygems/commit/32bee01fbe
2022-09-05 11:43:14 +09:00
David Rodríguez f7cf641469
[rubygems/rubygems] Fix resolution hanging on musl platforms
After recent musl support was added, Bundler started hanging in musl
platforms. I identified the issue where valid candidates were being
filtered out because their platform was specified as a string, and thus
`Gem::Platform.match_spec?` which under the hood ends up calling
`Gem::Platform#===` would return `nil`, because it does not support
comparing platforms to strings.

In particular, `Bundler::EndpointSpecification`'s platform coming from
the API was not instantiated as a `Gem::Platform`, hence the issue.

Also, this spec surfaced another issue where a bug corrected in
`Gem::Platform#match_platforms` had not been yet backported to Bundler.
So this commit also backports that to get the spec green across RubyGems
versions.

Finally, the fix in `Bundler::EndpointSpecification` made a realworld
spec start failing. This spec was faking out `rails-4.2.7.1` requirement
on Bundler in the `Gemfile.lock` file to be `>= 1.17, < 3` when the real
requirement is `>= 1.17, < 2`. Due to the bug in
`Bundler::EndpointSpecification`, the real requirement provided by the
compact index API (recorded with VCR) was being ignored, and the
`Gemfile.lock` fake requirement was being used, which made the spec
pass. This is all expected, and to fix the issue I changed the spec to
be really realworld and don't fake any Bundler requirements.

https://github.com/rubygems/rubygems/commit/faf4ef46bc
2022-09-05 11:43:14 +09:00
Nobuyoshi Nakada 1b8a644b44 [ruby/reline] Fix a typo [ci skip]
https://github.com/ruby/reline/commit/33bf80e757
2022-09-03 03:27:58 +09:00
Hiroshi SHIBATA 0d2422cf63 [ruby/reline] Workaround for padding width with Aracritty on macOS
https://github.com/ruby/reline/commit/fb4136c8a7
2022-09-02 16:09:51 +09:00
Hiroshi SHIBATA 7ff50ee35c [ruby/reline] Added some of abstruct methods for cursor
https://github.com/ruby/reline/commit/f5fa30d595
2022-09-02 16:09:50 +09:00
Imir Kiyamov f67ab7f30c [ruby/did_you_mean] Fixed correction duplicates in VariableNameChecker
https://github.com/ruby/did_you_mean/commit/c3fc412f6f
2022-09-01 19:47:39 +09:00
Nobuyoshi Nakada 59e8569cf9 [ruby/reline] Support dumb terminal
The "dumb" terminal is considered only on MSys tty now.  However, the
`TERM` feature has been used on many Unix-like systems for decades,
not MSys specific.

https://github.com/ruby/reline/commit/53fd51ab62
2022-09-01 16:36:16 +09:00
なつき aa5c1a0483 [rubygems/rubygems] Support non gnu libc arm-linux-eabi platforms
https://github.com/rubygems/rubygems/commit/fcf62799f2
2022-09-01 15:01:40 +09:00
なつき aded6971ad [rubygems/rubygems] Support non gnu libc arm-linux-eabi platforms
https://github.com/rubygems/rubygems/commit/394d7a6fc9
2022-09-01 15:01:40 +09:00
Mau Magnaguagno 941e9be0d9 [ruby/reline] Remove loose operation in Dialog#render_each_dialog
https://github.com/ruby/reline/commit/a6d1c917ce
2022-09-01 14:01:37 +09:00
Jean Boussier 739380c97d [ruby/net-protocol] Improve BufferedIO performance
`BufferedIO` is a bit inefficient for reading large responses because
it use the classic `buffer.slice!` technique which cause a lot of
unnecessary string copying.

This is particularly visible on line based protocol when reading
line by line.

Instead of repeatedly shifting the string, we can keep track of
which offset we're at, to know how many bytes are left in the buffer.

This change also open the door to further optimization by increasing
the buffer size, as previously `slice!` would get slower the larger
the buffer is.

Benchmark results:

```
=== 1k ===
Warming up --------------------------------------
                  1k     1.234k i/100ms
              1k opt     1.283k i/100ms
Calculating -------------------------------------
                  1k     12.615k (± 0.9%) i/s -     64.168k in   5.086995s
              1k opt     12.856k (± 0.9%) i/s -     65.433k in   5.090051s

Comparison:
                  1k:    12615.2 i/s
              1k opt:    12856.0 i/s - 1.02x  (± 0.00) faster

=== 10k ===
Warming up --------------------------------------
                 10k     1.165k i/100ms
             10k opt     1.269k i/100ms
Calculating -------------------------------------
                 10k     11.550k (± 2.4%) i/s -     58.250k in   5.046378s
             10k opt     12.736k (± 1.0%) i/s -     64.719k in   5.081969s

Comparison:
                 10k:    11550.3 i/s
             10k opt:    12736.3 i/s - 1.10x  (± 0.00) faster

=== 100k ===
Warming up --------------------------------------
                100k   809.000  i/100ms
            100k opt   926.000  i/100ms
Calculating -------------------------------------
                100k      8.054k (± 3.0%) i/s -     40.450k in   5.028299s
            100k opt      9.286k (± 2.2%) i/s -     47.226k in   5.088841s

Comparison:
                100k:     8053.6 i/s
            100k opt:     9285.5 i/s - 1.15x  (± 0.00) faster

=== 1M ===
Warming up --------------------------------------
                  1M   249.000  i/100ms
              1M opt   315.000  i/100ms
Calculating -------------------------------------
                  1M      2.448k (± 2.5%) i/s -     12.450k in   5.089744s
              1M opt      3.119k (± 2.6%) i/s -     15.750k in   5.053772s

Comparison:
                  1M:     2447.8 i/s
              1M opt:     3118.8 i/s - 1.27x  (± 0.00) faster
```

Profiling before (1MB responses):

```
==================================
  Mode: wall(1000)
  Samples: 5276 (0.00% miss rate)
  GC: 394 (7.47%)
==================================
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
      1622  (30.7%)        1622  (30.7%)     IO#wait_readable
       777  (14.7%)         777  (14.7%)     IO#read_nonblock
       365   (6.9%)         365   (6.9%)     (sweeping)
      2705  (51.3%)         364   (6.9%)     Net::BufferedIO#rbuf_fill
       264   (5.0%)         264   (5.0%)     String#index
       223   (4.2%)         223   (4.2%)     String#sub
       221   (4.2%)         221   (4.2%)     String#slice!
       185   (3.5%)         185   (3.5%)     String#split
       108   (2.0%)         108   (2.0%)     IO#write_nonblock
       101   (1.9%)         101   (1.9%)     String#downcase
        66   (1.3%)          66   (1.3%)     Net::BufferedIO#LOG
        57   (1.1%)          57   (1.1%)     String#count
        51   (1.0%)          51   (1.0%)     String#to_s
       391   (7.4%)          50   (0.9%)     Net::HTTPGenericRequest#write_header
        50   (0.9%)          50   (0.9%)     String#capitalize
        49   (0.9%)          49   (0.9%)     Array#join
        47   (0.9%)          47   (0.9%)     String#b
       106   (2.0%)          36   (0.7%)     Net::HTTPHeader#set_field
        34   (0.6%)          34   (0.6%)     Module#===
        33   (0.6%)          33   (0.6%)     String#[]
       140   (2.7%)          29   (0.5%)     Net::BufferedIO#write0
        29   (0.5%)          29   (0.5%)     (marking)
       281   (5.3%)          27   (0.5%)     Net::BufferedIO#rbuf_consume
      1195  (22.6%)          25   (0.5%)     Net::HTTPResponse#read_body
      1024  (19.4%)          25   (0.5%)     Net::HTTPResponse.each_response_header
        86   (1.6%)          24   (0.5%)     Net::HTTPHeader#set_field
        23   (0.4%)          23   (0.4%)     Net::HTTP#proxy_uri
        51   (1.0%)          23   (0.4%)     Net::HTTPHeader#initialize_http_header
      2225  (42.2%)          22   (0.4%)     Net::BufferedIO#readuntil
        20   (0.4%)          20   (0.4%)     Regexp#===
```

Profiling after (1MB responses):

```
==================================
  Mode: wall(1000)
  Samples: 15180 (0.00% miss rate)
  GC: 1688 (11.12%)
==================================
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
      4534  (29.9%)        4534  (29.9%)     IO#read_nonblock
     10650  (70.2%)        3944  (26.0%)     Net::HTTPOpt::BufferedIOOpt#rbuf_fill
      2101  (13.8%)        2101  (13.8%)     IO#wait_readable
      1442   (9.5%)        1442   (9.5%)     (sweeping)
       360   (2.4%)         360   (2.4%)     String#sub
       312   (2.1%)         312   (2.1%)     String#split
       265   (1.7%)         265   (1.7%)     String#bytesize
       246   (1.6%)         246   (1.6%)     (marking)
       151   (1.0%)         151   (1.0%)     IO#write_nonblock
       125   (0.8%)         125   (0.8%)     String#downcase
       116   (0.8%)         116   (0.8%)     String#index
       113   (0.7%)         113   (0.7%)     Module#===
       162   (1.1%)          89   (0.6%)     Net::HTTPOpt::BufferedIOOpt#rbuf_consume_all_shareable!
       158   (1.0%)          65   (0.4%)     Net::HTTPHeader#set_field
        63   (0.4%)          63   (0.4%)     String#capitalize
        63   (0.4%)          63   (0.4%)     BasicObject#equal?
        58   (0.4%)          58   (0.4%)     Regexp#match
        58   (0.4%)          58   (0.4%)     String#[]
       449   (3.0%)          56   (0.4%)     Net::HTTPGenericRequest#write_header
        53   (0.3%)          53   (0.3%)     String#to_s
        52   (0.3%)          52   (0.3%)     Net::HTTPOpt::BufferedIOOpt#LOG
        52   (0.3%)          52   (0.3%)     String#count
        44   (0.3%)          44   (0.3%)     String#byteslice
        44   (0.3%)          44   (0.3%)     Array#join
      1096   (7.2%)          42   (0.3%)     Net::HTTPResponse.each_response_header
      2617  (17.2%)          40   (0.3%)     Net::HTTPOpt::BufferedIOOpt#readuntil
       132   (0.9%)          30   (0.2%)     Net::HTTPOpt::BufferedIOOpt#rbuf_consume
        28   (0.2%)          28   (0.2%)     Regexp#===
        27   (0.2%)          27   (0.2%)     Net::HTTP#proxy_uri
      8862  (58.4%)          27   (0.2%)     Net::HTTPResponse#read_body
````

Benchmark code:

```ruby

require "fileutils"
DIR = "/tmp/www"
FileUtils.mkdir_p(DIR)
HOST = "127.0.0.1"
PORT = 8080
CONF = <<~EOS
daemon            off;
worker_processes  2;

events {
    worker_connections  128;
}

http {
    server_tokens off;
    charset       utf-8;

    server {
        server_name   localhost;
        listen        #{HOST}:#{PORT};

        keepalive_requests 10000000;
        keepalive_timeout 3600s;

        error_page    500 502 503 504  /50x.html;

        location      / {
            root      #{DIR};
        }

    }

}
EOS

File.write(File.join(DIR, "1k.txt"), 'a' * 1024)
File.write(File.join(DIR, "10k.txt"), 'a' * 1024 * 10)
File.write(File.join(DIR, "100k.txt"), 'a' * 1024 * 100)
File.write(File.join(DIR, "1M.txt"), 'a' * 1024 * 1024)

File.write(File.join(DIR, "nginx.conf"), CONF)

require "benchmark/ips"
require "net/http"

nginx_pid = Process.spawn('nginx', '-c', File.join(DIR, "nginx.conf"))

module Net
  class HTTPOpt < HTTP

    class BufferedIOOpt < ::Net::BufferedIO  #:nodoc: internal use only
      def initialize(io, read_timeout: 60, write_timeout: 60, continue_timeout: nil, debug_output: nil)
        @io = io
        @read_timeout = read_timeout
        @write_timeout = write_timeout
        @continue_timeout = continue_timeout
        @debug_output = debug_output
        @rbuf = ''.b
        @rbuf_offset = 0
      end

      attr_reader :io
      attr_accessor :read_timeout
      attr_accessor :write_timeout
      attr_accessor :continue_timeout
      attr_accessor :debug_output

      def inspect
        "#<#{self.class} io=#{@io}>"
      end

      def eof?
        @io.eof?
      end

      def closed?
        @io.closed?
      end

      def close
        @io.close
      end

      #
      # Read
      #

      public

      def read(len, dest = ''.b, ignore_eof = false)
        LOG "reading #{len} bytes..."
        read_bytes = 0
        begin
          while read_bytes + rbuf_size < len
            if s = rbuf_consume_all_shareable!
              read_bytes += s.bytesize
              dest << s
            end
            rbuf_fill
          end
          s = rbuf_consume(len - read_bytes)
          read_bytes += s.bytesize
          dest << s
        rescue EOFError
          raise unless ignore_eof
        end
        LOG "read #{read_bytes} bytes"
        dest
      end

      def read_all(dest = ''.b)
        LOG 'reading all...'
        read_bytes = 0
        begin
          while true
            if s = rbuf_consume_all_shareable!
              read_bytes += s.bytesize
              dest << s
            end
            rbuf_fill
          end
        rescue EOFError
          ;
        end
        LOG "read #{read_bytes} bytes"
        dest
      end

      def readuntil(terminator, ignore_eof = false)
        offset = @rbuf_offset
        begin
          until idx = @rbuf.index(terminator, offset)
            offset = @rbuf.bytesize
            rbuf_fill
          end
          return rbuf_consume(idx + terminator.bytesize - @rbuf_offset)
        rescue EOFError
          raise unless ignore_eof
          return rbuf_consume
        end
      end

      def readline
        readuntil("\n").chop
      end

      private

      BUFSIZE = 1024 * 16

      def rbuf_fill
        tmp = @rbuf_empty ? @rbuf : nil
        case rv = @io.read_nonblock(BUFSIZE, tmp, exception: false)
        when String
          @rbuf_empty = false
          if rv.equal?(tmp)
            @rbuf_offset = 0
          else
            @rbuf << rv
            rv.clear
          end
          return
        when :wait_readable
          (io = @io.to_io).wait_readable(@read_timeout) or raise Net::ReadTimeout.new(io)
          # continue looping
        when :wait_writable
          # OpenSSL::Buffering#read_nonblock may fail with IO::WaitWritable.
          # http://www.openssl.org/support/faq.html#PROG10
          (io = @io.to_io).wait_writable(@read_timeout) or raise Net::ReadTimeout.new(io)
          # continue looping
        when nil
          raise EOFError, 'end of file reached'
        end while true
      end

      def rbuf_flush
        if @rbuf_empty
          @rbuf.clear
          @rbuf_offset = 0
        end
        nil
      end

      def rbuf_size
        @rbuf.bytesize - @rbuf_offset
      end

      # Warning: this method may share the buffer to avoid
      # copying. The caller must no longer use the returned
      # string once rbuf_fill has been called again
      def rbuf_consume_all_shareable!
        @rbuf_empty = true
        buf = if @rbuf_offset == 0
          @rbuf
        else
          @rbuf.byteslice(@rbuf_offset..-1)
        end
        @rbuf_offset = @rbuf.bytesize
        buf
      end

      def rbuf_consume(len = nil)
        if @rbuf_offset == 0 && (len.nil? || len == @rbuf.bytesize)
          s = @rbuf
          @rbuf = ''.b
          @rbuf_offset = 0
          @rbuf_empty = true
        elsif len.nil?
          s = @rbuf.byteslice(@rbuf_offset..-1)
          @rbuf = ''.b
          @rbuf_offset = 0
          @rbuf_empty = true
        else
          s = @rbuf.byteslice(@rbuf_offset, len)
          @rbuf_offset += len
          @rbuf_empty = @rbuf_offset == @rbuf.bytesize
          rbuf_flush
        end

        @debug_output << %Q[-> #{s.dump}\n] if @debug_output
        s
      end

      #
      # Write
      #

      public

      def write(*strs)
        writing {
          write0(*strs)
        }
      end

      alias << write

      def writeline(str)
        writing {
          write0 str + "\r\n"
        }
      end

      private

      def writing
        @written_bytes = 0
        @debug_output << '<- ' if @debug_output
        yield
        @debug_output << "\n" if @debug_output
        bytes = @written_bytes
        @written_bytes = nil
        bytes
      end

      def write0(*strs)
        @debug_output << strs.map(&:dump).join if @debug_output
        orig_written_bytes = @written_bytes
        strs.each_with_index do |str, i|
          need_retry = true
          case len = @io.write_nonblock(str, exception: false)
          when Integer
            @written_bytes += len
            len -= str.bytesize
            if len == 0
              if strs.size == i+1
                return @written_bytes - orig_written_bytes
              else
                need_retry = false
                # next string
              end
            elsif len < 0
              str = str.byteslice(len, -len)
            else # len > 0
              need_retry = false
              # next string
            end
            # continue looping
          when :wait_writable
            (io = @io.to_io).wait_writable(@write_timeout) or raise Net::WriteTimeout.new(io)
            # continue looping
          end while need_retry
        end
      end

      #
      # Logging
      #

      private

      def LOG_off
        @save_debug_out = @debug_output
        @debug_output = nil
      end

      def LOG_on
        @debug_output = @save_debug_out
      end

      def LOG(msg)
        return unless @debug_output
        @debug_output << msg + "\n"
      end
    end
    BufferedIO = BufferedIOOpt

    # Unchanged from ruby 3.1.1, only allow to lookup the mofidied BufferedIO
    def connect
      if use_ssl?
        # reference early to load OpenSSL before connecting,
        # as OpenSSL may take time to load.
        @ssl_context = OpenSSL::SSL::SSLContext.new
      end

      if proxy? then
        conn_addr = proxy_address
        conn_port = proxy_port
      else
        conn_addr = conn_address
        conn_port = port
      end

      D "opening connection to #{conn_addr}:#{conn_port}..."
      begin
        s = Socket.tcp conn_addr, conn_port, @local_host, @local_port, connect_timeout: @open_timeout
      rescue => e
        e = Net::OpenTimeout.new(e) if e.is_a?(Errno::ETIMEDOUT) #for compatibility with previous versions
        raise e, "Failed to open TCP connection to " +
          "#{conn_addr}:#{conn_port} (#{e.message})"
      end
      s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
      D "opened"
      if use_ssl?
        if proxy?
          plain_sock = BufferedIO.new(s, read_timeout: @read_timeout,
                                      write_timeout: @write_timeout,
                                      continue_timeout: @continue_timeout,
                                      debug_output: @debug_output)
          buf = "CONNECT #{conn_address}:#{@port} HTTP/#{HTTPVersion}\r\n"
          buf << "Host: #{@address}:#{@port}\r\n"
          if proxy_user
            credential = ["#{proxy_user}:#{proxy_pass}"].pack('m0')
            buf << "Proxy-Authorization: Basic #{credential}\r\n"
          end
          buf << "\r\n"
          plain_sock.write(buf)
          HTTPResponse.read_new(plain_sock).value
          # assuming nothing left in buffers after successful CONNECT response
        end

        ssl_parameters = Hash.new
        iv_list = instance_variables
        SSL_IVNAMES.each_with_index do |ivname, i|
          if iv_list.include?(ivname)
            value = instance_variable_get(ivname)
            unless value.nil?
              ssl_parameters[SSL_ATTRIBUTES[i]] = value
            end
          end
        end
        @ssl_context.set_params(ssl_parameters)
        @ssl_context.session_cache_mode =
          OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT |
          OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE
        @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess }
        D "starting SSL for #{conn_addr}:#{conn_port}..."
        s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
        s.sync_close = true
        # Server Name Indication (SNI) RFC 3546
        s.hostname = @address if s.respond_to? :hostname=
        if @ssl_session and
           Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout
          s.session = @ssl_session
        end
        ssl_socket_connect(s, @open_timeout)
        if (@ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE) && @ssl_context.verify_hostname
          s.post_connection_check(@address)
        end
        D "SSL established, protocol: #{s.ssl_version}, cipher: #{s.cipher[0]}"
      end
      @socket = BufferedIO.new(s, read_timeout: @read_timeout,
                               write_timeout: @write_timeout,
                               continue_timeout: @continue_timeout,
                               debug_output: @debug_output)
      @last_communicated = nil
      on_connect
    rescue => exception
      if s
        D "Conn close because of connect error #{exception}"
        s.close
      end
      raise
    end
    private :connect
  end
end

begin
  sleep 0.2

  connection = Net::HTTP.start(HOST, PORT)
  connection.keep_alive_timeout = 3600
  connection_opt = Net::HTTPOpt.start(HOST, PORT)
  connection_opt.keep_alive_timeout = 3600

  unless connection.request_get("/100k.txt").body == connection_opt.request_get("/100k.txt").body
    abort("bug?")
  end

  if ARGV.first == "profile"
    require 'stackprof'
    require 'json'

    StackProf.run(mode: :wall, out: "/tmp/stackprof-net-http.dump", raw: true) do
      40_000.times do
        connection.request_get("/1M.txt").body
      end
    end
    File.write("/tmp/stackprof-net-http.json", JSON.dump(Marshal.load(File.binread("/tmp/stackprof-net-http.dump"))))
    system("stackprof", "/tmp/stackprof-net-http.rb")

    StackProf.run(mode: :wall, out: "/tmp/stackprof-net-http-opt.dump", raw: true) do
      40_000.times do
        connection_opt.request_get("/1M.txt").body
      end
    end
    File.write("/tmp/stackprof-net-http-opt.json", JSON.dump(Marshal.load(File.binread("/tmp/stackprof-net-http-opt.dump"))))
    system("stackprof", "/tmp/stackprof-net-http-opt.dump")

  else
    %w(1k 10k 100k 1M).each do |size|
      puts "=== #{size} ==="
      Benchmark.ips do |x|
        path = "/#{size}.txt"
        x.report("#{size}") { connection.request_get(path).body }
        x.report("#{size} opt") { connection_opt.request_get(path).body }
        x.compare!(order: :baseline)
      end
      puts
    end
  end
ensure
  Process.kill('TERM', nginx_pid)
  Process.wait(nginx_pid)
end

```

https://github.com/ruby/net-protocol/commit/781e400389
2022-08-31 12:37:49 +09:00
shields 8799c91205 [rubygems/rubygems] Add platform :windows as a shortcut for all Windows platforms
https://github.com/rubygems/rubygems/commit/f3c49ad3f7
2022-08-29 00:33:15 +09:00
Aleksandr Varnin 381d8e43ce [rubygems/rubygems] Bundler: make to_lock consistent between Gem::Dependency and Bundler::Dependency
https://github.com/rubygems/rubygems/commit/971d57cf5a
2022-08-28 02:04:14 +09:00
Jun Aruga 3504be1bc1 [ruby/irb] Require RDoc in `input-method.rb` again in a limited scope.
RDoc is implemented as soft dependency in IRB. See how the rdoc is required in
the files. I reverted the commit below.

```
$ grep -ril rdoc lib/
lib/irb/cmd/help.rb
lib/irb/completion.rb
lib/irb/easter-egg.rb
lib/irb/input-method.rb
```

---

Revert "Remove `require` in signal handler to avoid ThreadError"

This reverts commit https://github.com/ruby/irb/commit/5f749c613c89.

https://github.com/ruby/irb/commit/b24852058f
2022-08-26 09:57:02 +09:00
David Rodríguez ad8774f8e5 [rubygems/rubygems] Fix another regression for sorbet
Recently a changed was introduced to update the resolver platforms after
it has been created, in order to remove the "ruby" platform from it if
it's to be removed from the lockfile. However, it did not update the
`@resolving_only_for_ruby` instance variable in that case, so the
resolver was not properly doing the right thing anymore.

To fix this, I tweaked the code to restore not changing resolver
platforms after the resolver has been instantiated.

https://github.com/rubygems/rubygems/commit/8fbc30a1d0
2022-08-25 23:39:02 +09:00
David Rodríguez 0ad9cc1696 [rubygems/rubygems] Backport non-gnu libc on linux platform matching to Bundler
https://github.com/rubygems/rubygems/commit/703373b41f

Co-authored-by: Loic Nageleisen <loic.nageleisen@gmail.com>
2022-08-24 17:59:15 +09:00
Vít Ondruch 46c3a93982 [ruby/irb] Drop hard dependency on RDoc.
This has been introduced in https://github.com/ruby/irb/commit/026700499dfd,
but it seems that this is just be mistake, otherwise the later handling
of `LoadError` would not be needed.

https://github.com/ruby/irb/commit/54c8df06ff
2022-08-23 18:01:35 +09:00
Yusuke Endoh 983115cf3c [ruby/fileutils] FileUtils.rm* methods swallows only Errno::ENOENT when force is true
... instead of any StandardError.

To behave like the standard `rm` command, it should only ignore
exceptions about not existing files, not every exception. This should
make debugging some errors easier, because the expectation is that `rm
-rf` will succeed if and only if, all given files (previously existent
or not) are removed. However, due to this exception swallowing, this is
not always the case.

From the `rm` man page

> COMPATIBILITY
>
> The rm utility differs from historical implementations in that the -f
> option only masks attempts to remove non-existent files instead of
> masking a large variety of errors.

https://github.com/ruby/fileutils/commit/fa65d676ec

Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net>
2022-08-23 16:52:41 +09:00
Yusuke Endoh 96562a517d [ruby/fileutils] Narrow the scope of ensure
The ensure in postorder_traverse was added for [Bug #6756].
The intention was to try to delete the parent directory if it failed to
get the children. (It may be possible to delete the directory if it is
empty.)

However, the ensure region rescue'ed not only "failure to get children"
but also "failure to delete each child". Thus, the following raised
Errno::ENOTEMPTY, but we expect it to raise Errno::EACCES.

```
$ mkdir foo
$ touch foo/bar
$ chmod 555 foo
$ ruby -rfileutils -e 'FileUtils.rm_rf("foo")'
```

This changeset narrows the ensure region so that it rescues only
"failure to get children".

https://github.com/ruby/fileutils/commit/ec5d3b84ea
2022-08-23 16:52:40 +09:00
Takuya Noguchi 22a416a3bb [rubygems/rubygems] Bundler: update the link suggested on error with the new one
Also typo is fixed.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/9c1ea52ddf
2022-08-23 14:28:47 +09:00
Hiroshi SHIBATA f69244cee8 Merge rubygems/bundler HEAD
Pick from 6b3a5a9ab0
2022-08-23 10:45:57 +09:00
David Rodríguez 4790d0accd [rubygems/rubygems] Fix conservative update downgrading top level gems
When `--conservative` is passed, explicit unlocks are set for top level
gems via `@unlock[:gems]`, so that only those particular gems are
allowed to be updated.

When we compute the "base resolve" from the lockfile (the set of gems
whose versions should be kept pinned by the resolver), we always exclude
gems explicitly unlocked through `@unlock[:gems]` from it. This is done
by the `converge_specs` method.

However, the `converge_specs` method is also used for figuring out
additional lower bound requirements from the lockfile. But in this case,
even if gems are explicitly unlock in `@unlock[:gems]`, we still want to
add the additional requirement, so that gems are not downgraded by the
resolver.

So the solution is to move the line filtering out gems in
`@unlock[:gems]` from the `converged_specs` method out of that method,
so that it only applies for computing the "base resolve", but not the
addtional lower bound requirements.

https://github.com/rubygems/rubygems/commit/405119bd7b
2022-08-23 10:45:57 +09:00
David Rodríguez c21c9a29ee [rubygems/rubygems] Refactor building metadata dependencies
https://github.com/rubygems/rubygems/commit/fa60f1fe43
2022-08-23 10:45:57 +09:00
David Rodríguez 29c443fedc [rubygems/rubygems] Remove unnecessary mixin inclusion
It's already included by the parent.

https://github.com/rubygems/rubygems/commit/3ffe389c44
2022-08-23 10:45:57 +09:00
David Rodríguez b30fc03e92 [rubygems/rubygems] Centralize loading `Bundler::MatchPlatform` mixin
It's explicitly loaded when monkeypatching RubyGems, which we do very
early. So neither autoloading it, nor explicitly loading it anywhere
else is necessary.

https://github.com/rubygems/rubygems/commit/fbc7a57161
2022-08-23 10:45:57 +09:00
David Rodríguez 59f27445ea [rubygems/rubygems] Implement extra rules for libc versioning
https://github.com/rubygems/rubygems/commit/7e976d790a
2022-08-23 05:50:23 +09:00
David Rodríguez 492e70c7b4 [rubygems/rubygems] Fix `gem install` still choosing musl incorrectly
https://github.com/rubygems/rubygems/commit/1b9f7f50a5
2022-08-23 05:50:22 +09:00
David Rodríguez 9819283044 [rubygems/rubygems] Handle non-gnu libc on linux platforms in RubyGems
Attempting to install a gem published as both *-linux and *-linux-musl
results in the incorrect gem being picked up, causing build failures due
to binary incompatibility. This is caused by the `nil` wildcard
swallowing the libc information upon version comparison.

Handle the linux case by performing only non-wildcard equality on the
version and asserting 'gnu' and nil equivalence, while preserving the
current behaviour for other OSes.

https://github.com/rubygems/rubygems/commit/9eead86abc

Co-authored-by: Loic Nageleisen <loic.nageleisen@gmail.com>
2022-08-23 05:50:21 +09:00
Loic Nageleisen 615f79be3c [rubygems/rubygems] Test platform's version-ness consistently
The symmetry with the "for command line" case is made more apparent.

https://github.com/rubygems/rubygems/commit/ab85d3558f
2022-08-23 05:50:20 +09:00
David Rodríguez 70f69f8539 [ruby/fileutils] Fix mkdir_p hanging on Windows when trying to create a file on a offline drive
https://github.com/ruby/fileutils/commit/9cc6a082d7
2022-08-22 10:12:25 +09:00
David Rodríguez 560941e711 [rubygems/rubygems] Fix edge case where `bundler/inline` unintentionally skips install
If the application has the `no_install` setting set for `bundle
package`, then `bundler/inline` would silently skip installing any gems.

https://github.com/rubygems/rubygems/commit/7864f49b27
2022-08-21 17:54:11 +09:00
David Rodríguez b87ddd7538 [rubygems/rubygems] Fix `bundle platform` crash when there's a lockfile with no Ruby locked
https://github.com/rubygems/rubygems/commit/49fc54e87d
2022-08-21 17:53:40 +09:00
Yusuke Endoh 6bcb473d9c [ruby/error_highlight] Apply ErrorHighlight::CoreExt to TypeError and ArgumentError
https://github.com/ruby/error_highlight/commit/defcaf1beb
2022-08-19 18:34:15 +09:00
schneems 490af8dbdb Sync SyntaxSuggest
```
$ tool/sync_default_gems.rb syntax_suggest
```
2022-08-19 10:02:24 +09:00
Jean Boussier 3850113e20 [ruby/cgi] Implement `CGI.url_encode` and `CGI.url_decode`
[Feature #18822]

Ruby is somewhat missing an RFC 3986 compliant escape method.

https://github.com/ruby/cgi/commit/c2729c7f33
2022-08-16 19:12:03 +09:00
David Rodríguez e77c8397c2 [rubygems/rubygems] Fix Ruby platform incorrectly removed on `bundle update`
https://github.com/rubygems/rubygems/commit/0d321c9e3a
2022-08-15 17:42:16 +09:00
Yusuke Endoh d9f1b8baa3 [ruby/error_highlight] Add a note about the current limitation of ErrorHighlight.spot
https://github.com/ruby/error_highlight/commit/489ce80a62
2022-08-12 14:04:41 +09:00
Yusuke Endoh 1b32a4c7bb [ruby/error_highlight] Bump version
https://github.com/ruby/error_highlight/commit/6edf0a0a5d
2022-08-10 21:51:51 +09:00
Yusuke Endoh 3a58009066 [ruby/error_highlight] Make backtrace_location keyword work
We had to keep backtrace_location before opts is overwritten.

https://github.com/ruby/error_highlight/commit/2735e4681a
2022-08-10 21:19:10 +09:00
Yusuke Endoh 99e7fa5b37 [ruby/error_highlight] Make ErrorHighlight.spot accept Exception (https://github.com/ruby/error_highlight/pull/25)
... and move things from core_ext.rb to base.rb.
This will confine CRuby-dependent things to ErrorHighlight.spot.

https://github.com/ruby/error_highlight/commit/22d1dd7824
2022-08-10 18:37:13 +09:00
Hiroshi SHIBATA 44264b4fee Merge rubygems/bundler HEAD.
Pick from dfbb5a3811
2022-08-09 12:05:19 +09:00
Nobuyoshi Nakada 5beb75ce8d
[ruby/rdoc] Allow multiple footnotes without in-between blank lines
https://github.com/ruby/ruby/commit/e4e054e3ce40 used four footnotes
without blank lines.  And the ChangeLog generated from that commit
resulted in ``undefined method `parts' for nil`` error.

For now, let a footnote terminated by the next footnote mark.

Also refined the error message when undefined footnote is used.

https://github.com/ruby/rdoc/commit/a7f290130b
2022-08-08 01:12:49 +09:00
Burdette Lamar 23a84d53c6 [ruby/rdoc] [DOC] Removes remaining old Markup Reference (https://github.com/ruby/rdoc/pull/910)
https://github.com/ruby/rdoc/commit/4e44c9c6cf
2022-08-07 21:07:23 +09:00
David Rodríguez 466a760e18 [rubygems/rubygems] Fix yanked gems being unintentionally update when other gems are unlocked
This is a regression from a change intended to raise errors when user
puts a gem under an incorrect source in the Gemfile by mistake. To fix
the issue, we revert the change that caused it and implement it in a
different way that restores the resolver independency from real
specifications. Now it deals only with names and versions and does not
try to materialize anything into real specifications before resolving.

https://github.com/rubygems/rubygems/commit/d2bf1b86eb
2022-08-06 15:41:46 +09:00
David Rodríguez 8dd63b89d9 [rubygems/rubygems] Move comment where the actual replacement happens
https://github.com/rubygems/rubygems/commit/d60acdf80d
2022-08-06 15:41:46 +09:00
David Rodríguez 4ea521f6c7 [rubygems/rubygems] Remove unclear comment
https://github.com/rubygems/rubygems/commit/3a843c1ac7
2022-08-06 15:41:45 +09:00
David Rodríguez af40af45b2 [rubygems/rubygems] Extract `SourceList#get_with_fallback`
https://github.com/rubygems/rubygems/commit/9dbc4757a8
2022-08-06 15:41:45 +09:00
David Rodríguez f310ac1cb2 [rubygems/rubygems] Include backtrace with crashes by default
https://github.com/rubygems/rubygems/commit/3cc3bfd371
2022-08-05 16:37:03 +09:00
David Rodríguez 5a9db23734 [rubygems/rubygems] Automatically remove "ruby" from lockfile if incomplete
https://github.com/rubygems/rubygems/commit/69d0b4e10b
2022-08-05 16:36:42 +09:00
Alan Wu e5a3f23256 Use $(bindir) for path to executable in mkmf
For the macOS -bundle_loader linker option, we need a path to the
Ruby exectuable. $(RUBY) is not necessarily a path since it could
be a command line invocation. That happens during build with
runruby.rb and can happen post installation if the user passes
the --ruby option to a extconf.rb. Use $(bindir) to locate
the executable instead.

Before installation, $(bindir) doesn't exist, so we need to be
able to override $(BUILTRUBY) in such situations so test-spec
and bundled extensions could build. Use a new mkmf global,
$builtruby, to do this; set it in fake.rb and in extmk.rb.

Our build system is quite complex...
2022-08-04 16:29:22 +09:00
Yuta Saito 50d81bfbc1 Link ext bundles with bundle loader option for newer ld64
ld64 shipped with Xcode 14 emits a warning when using `-undefined
dynamic_lookup`.

```
ld: warning: -undefined dynamic_lookup may not work with chained fixups
```

Actually, `-undefined dynamic_lookup` doesn't work when:

1. Link a *shared library* with the option
2. Link it with a program that uses the chained-fixup introduced from
   macOS 12 and iOS 15
because `-undefined dynamic_lookup` uses lazy-bindings and they won't be
bound while dyld fixes-up by traversing chained-fixup info.

However, we build exts as *bundles* and they are loaded only through
`dlopen`, so it's safe to use `-undefined dynamic_lookup` in theory.
So the warning produced by ld64 is false-positive, and it results
failure of option checking in configuration. Therefore, it would be an
option to ignore the warning during our configuration.

On the other hand, `-undefined dynamic_lookup` is already deprecated on
all darwin platforms except for macOS, so it's good time to get rid of
the option. ld64 also provides `-bundle_loader <executable>` option,
which allows to resolve symbols defined in the executable symtab while
linking. It behaves almost the same with `-undefined dynamic_lookup`,
but it makes the following changes:

1. Require that unresolved symbols among input objects must be defined
   in the executable.
2. Lazy symbol binding will lookup only the symtab of the bundle loader
   executable. (`-undefined dynamic_lookup` lookups all symtab as flat
   namespace)

This patch adds `-bundle_loader $(RUBY)` when non-EXTSTATIC
configuration by assuming ruby executable can be linked before building
exts.

See "New Features" subsection under "Linking" section for chained fixup
https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes
2022-08-04 16:29:22 +09:00
David Rodríguez 542040fb83 [rubygems/rubygems] Warn dangling symlinks
https://github.com/rubygems/rubygems/commit/425b78637f
2022-08-04 13:36:45 +09:00
David Rodríguez 0591780a74 [rubygems/rubygems] Extract entry.full_name to a variable
https://github.com/rubygems/rubygems/commit/3973773005
2022-08-04 13:36:44 +09:00
tompng b54f26b704 [ruby/irb] shortcut colorize_code to speedup pretty_print
https://github.com/ruby/irb/commit/8a074a6904
2022-08-04 08:37:03 +09:00
David Rodríguez 851b3aa7dd [rubygems/rubygems] Fix `bundle outdated --strict`
It should be an alias of `--filter-strict`.

`--update-strict` is essentially a dummy option with no special behavior
associated and should be deprecated.

https://github.com/rubygems/rubygems/commit/ec1e5d83c8
2022-08-03 16:33:53 +09:00
David Rodríguez 35c65e7ba6 [rubygems/rubygems] Fix conservative updates regardless of `--strict`
https://github.com/rubygems/rubygems/commit/c9a1d69a8d
2022-08-03 16:33:52 +09:00
Hiroshi SHIBATA 71794a75db Merge rubygems/bundler HEAD
Pick from 8331e63263
2022-08-03 13:14:10 +09:00
Ilya Dyakonov 4f00ee8d47 [rubygems/rubygems] fix platform matching for index specs
https://github.com/rubygems/rubygems/commit/f087f1b590
2022-08-03 06:56:36 +09:00
David Rodríguez 20936eb3a9 [rubygems/rubygems] Warn (rather than crash) when setting `nil` specification versions
https://github.com/rubygems/rubygems/commit/a4ba1a4d97
2022-08-03 06:56:18 +09:00
David Rodríguez f70b26af47 [rubygems/rubygems] Array is already uniq, no need to deduplicate it
https://github.com/rubygems/rubygems/commit/3212ae14b7
2022-08-02 21:57:52 +09:00
Takuya Noguchi b81858cf6f [rubygems/rubygems] Fix arguments for bundle-config(1) docs
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/3e62ca776d
2022-08-02 18:35:38 +09:00
David Rodríguez 3e4fedca4e [rubygems/rubygems] Preserve the previous behavior of raising an error when in frozen mode
https://github.com/rubygems/rubygems/commit/6e35a6edfe
2022-08-02 16:10:19 +09:00
David Rodríguez f4f681463f [rubygems/rubygems] Don't discard candidates matching ruby metadata
Do dependency filtering and materialization in one step. Before,
dependency filtering would not consider ruby metadata so it would
discard variants that end up not being materializable in the end.

https://github.com/rubygems/rubygems/commit/0c0d40d417

Co-authored-by: Ian Ker-Seymer <ian.kerseymer@shopify.com>
2022-08-02 16:10:18 +09:00
David Rodríguez 9189c2d5ef [rubygems/rubygems] Materializing for resolution already filters platforms
https://github.com/rubygems/rubygems/commit/9f4ba9ebb0
2022-08-02 16:10:17 +09:00
David Rodríguez 8c98f7be57 [rubygems/rubygems] Remove unnecessary local variable
https://github.com/rubygems/rubygems/commit/a997210473
2022-08-02 16:10:17 +09:00
David Rodríguez 5487e76374 [rubygems/rubygems] Prefer reverse+find to select+last
https://github.com/rubygems/rubygems/commit/ffb161bb69
2022-08-02 16:10:16 +09:00
David Rodríguez bc0de1e162 [rubygems/rubygems] Only need to filter platforms when materialization is not strict
https://github.com/rubygems/rubygems/commit/9d878cbda0
2022-08-02 16:10:16 +09:00
David Rodríguez 91b9bd6234 [rubygems/rubygems] This should go through the standard source search logic
https://github.com/rubygems/rubygems/commit/087e3e4e3b
2022-08-02 16:10:15 +09:00
David Rodríguez 35e508d13e [rubygems/rubygems] Refactor materialization conditions
https://github.com/rubygems/rubygems/commit/08e1554fb6
2022-08-02 16:10:14 +09:00
David Rodríguez ed9bbfd759 [rubygems/rubygems] Fix incorrect force_ruby_platform propagation
It was just working by chance.

(cherry picked from commit https://github.com/rubygems/rubygems/commit/16b2d6bfe893)

https://github.com/rubygems/rubygems/commit/8f922d980f
2022-08-02 16:10:14 +09:00
David Rodríguez 7cc5a657ee [rubygems/rubygems] Remove unnecessary special case for Bundler
https://github.com/rubygems/rubygems/commit/2777e79b8e
2022-08-02 16:10:13 +09:00
David Rodríguez 6ec8f684aa [rubygems/rubygems] Move some logic to `LazySpecification#__materialize__`
https://github.com/rubygems/rubygems/commit/5e100df7c9
2022-08-02 16:10:13 +09:00
David Rodríguez 13305bf0c9 [rubygems/rubygems] Fix crash when running `bundle outdated` in debug mode
Previously it would crash like this:

````
$ /Users/deivid/.asdf/installs/ruby/3.1.2/bin/ruby -I/Users/deivid/Code/rubygems/rubygems/bundler/spec -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/artifice/fail.rb -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/hax.rb /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle outdated --patch --strict --filter-patch
Running `bundle outdated --filter-patch --patch --strict` with bundler 2.4.0.dev
Found changes from the lockfile, re-resolving dependencies because bundler is unlocking Using a local server, bundler won't use the CompactIndex API
Fetching source index from file:///Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/remote4/
Resolving dependencies...
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
RuntimeError: LazySpecification has not been materialized yet (calling :loaded_from [])
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/lazy_specification.rb:147:in `method_missing'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:214:in `gem_column_for'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:174:in `block in print_gems_table'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:173:in `map'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:173:in `print_gems_table'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:123:in `run'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:420:in `outdated'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:31:in `dispatch'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:25:in `start'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:48:in `block in <top (required)>'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:36:in `<top (required)>'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:25:in `load'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:25:in `<main>'
```
````

https://github.com/rubygems/rubygems/commit/23c46f3b57
2022-08-01 23:14:23 +09:00
Takuya Noguchi b0e6d07ce4 [rubygems/rubygems] Update bundle-platform(1) man
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/1c3736f5af
2022-08-01 01:31:24 +09:00
Nobuyoshi Nakada af265d73fb [ruby/rdoc] Fix blockquote with word in verbatim
https://github.com/ruby/rdoc/commit/75eee668a5
2022-07-30 11:04:11 +09:00
David Rodríguez 030050cdfa [rubygems/rubygems] Make `--standalone` play nice with `--local`
I'm not sure if using relative paths in the generated script is best for
this case, since it makes the script not movable, but that can be
improved later.

https://github.com/rubygems/rubygems/commit/7f5bdbb842
2022-07-30 04:24:25 +09:00
David Rodríguez b515fdcc32 [rubygems/rubygems] No need to set anything at all unless standalone is given
https://github.com/rubygems/rubygems/commit/d695c8da3e
2022-07-30 04:24:24 +09:00
Hiroshi SHIBATA 4e886d2ade Update parser-text.rb with 4ecc13c9cb 2022-07-29 19:10:10 +09:00
Luka Dornhecker 4bf97a8ec4 fix typo in Time#xmlschema documentation 2022-07-29 19:10:10 +09:00
konsolebox 419ad1e13e [ruby/optparse] Also accept '-' as an optional argument (https://github.com/ruby/optparse/pull/35)
https://github.com/ruby/optparse/commit/f2b8318631
2022-07-29 19:10:10 +09:00
Hiroshi SHIBATA 3725454161 Merge ruby/fileutils from 332025bc02 2022-07-29 19:10:10 +09:00
Takuya Noguchi d1e726cce7 [rubygems/rubygems] Fix dead links to deprecated bundle-package(1) with bundler-cache(1)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/9c2e80a10f
2022-07-29 19:06:49 +09:00
Takuya Noguchi def1d44aa1 [rubygems/rubygems] Add package/pack aliases to man pages for cache
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/1685e3a9dc
2022-07-29 16:31:06 +09:00
Hiroshi SHIBATA bfd09b1116 Merge rubygems master from 446cc57a7c 2022-07-29 15:46:15 +09:00
Nobuyoshi Nakada f29f1d22c3 [ruby/rdoc] Fix formatting blockquote in verbatim
Reported at https://github.com/ruby/rdoc/pull/907#discussion_r932505816

https://github.com/ruby/rdoc/commit/86384ac7f9
2022-07-29 09:21:33 +09:00
Burdette Lamar c56e957dec [ruby/rdoc] Link from RDoc::Markup to RDoc::MarkupReference (https://github.com/ruby/rdoc/pull/906)
Recently new RDoc::MarkupReference replaces Markup Reference in RDoc::Markup (which was always the goal).

https://github.com/ruby/rdoc/commit/825be7eaf4
2022-07-29 01:06:34 +09:00
moe c3d9849df9 [rubygems/rubygems] Add ignore_funding_requests config flag
https://github.com/rubygems/rubygems/commit/ab302f72c9
2022-07-27 05:39:40 +09:00
David Rodríguez b4ae144e19 [rubygems/rubygems] Don't use Pathname for creating extension dir
Not sure why, but I run into the following flaky test failure

````
(...)

Invoking `/Users/deivid/.asdf/installs/ruby/3.1.2/bin/ruby -I/Users/deivid/Code/rubygems/rubygems/bundler/spec -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/artifice/fail.rb -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/hax.rb /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/bin/bundle install` failed with output:
----------------------------------------------------------------------
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
NameError: constant Pathname::FileUtils not defined

    FileUtils.mkpath(@path, mode: mode)
    ^^^^^^^^^
  /Users/deivid/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0/pathname.rb:585:in `mkpath'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/shared_helpers.rb:103:in `filesystem_access'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/rubygems_gem_installer.rb:78:in `build_extensions'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/source/rubygems.rb:207:in `install'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:62:in `apply_func'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:54:in `loop'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:54:in `process_queue'
  /Users/deivid/Code/rubygems/rubygems/bundler/tmp/4/gems/system/gems/bundler-2.4.0.dev/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

(...)
```

Whatever it was, this small change should fix it.

https://github.com/rubygems/rubygems/commit/71d7503ce4
2022-07-27 04:56:34 +09:00
David Rodríguez 6a69807576 [rubygems/rubygems] Completely drop base parameter from index
This parameter was coupling the concept of lockfile with the index. I
don't think it's necessary.

Also I believe it's causing some flaky test failures, which might leak
into realworld issues. They are like this:

````
Invoking `/opt/hostedtoolcache/Ruby/3.0.4/x64/bin/ruby -I/home/runner/work/rubygems/rubygems/bundler/spec -r/home/runner/work/rubygems/rubygems/bundler/spec/support/artifice/fail.rb -r/home/runner/work/rubygems/rubygems/bundler/spec/support/hax.rb /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle lock` failed with output:
----------------------------------------------------------------------
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
NoMethodError: undefined method `identifier' for #<Gem::Specification:0x00005639ad0db0a0 @extension_dir=nil, @full_gem_path=nil, @gem_dir=nil, @ignored=nil, @bin_dir=nil, @cache_dir=nil, @cache_file=nil, @doc_dir=nil, @ri_dir=nil, @spec_dir=nil, @spec_file=nil, @gems_dir=nil, @base_dir=nil, @loaded=false, @activated=false, @loaded_from=nil, @original_platform="ruby", @installed_by_version=nil, @autorequire=nil, @date=2022-07-25 00:00:00 UTC, @description="This is a completely fake gem, for testing purposes.", @email="foo@bar.baz", @homepage="http://example.com", @name="win32-process", @post_install_message=nil, @signing_key=nil, @summary="This is just a fake gem for testing", @version=#<Gem::Version "0.8.3">, @authors=["no one"], @bindir="bin", @cert_chain=[], @dependencies=[<Gem::Dependency type=:runtime name="ffi" requirements=">= 1.0.0">], @executables=[], @extensions=[], @extra_rdoc_files=[], @files=[], @licenses=[], @metadata={}, @platform="ruby", @rdoc_options=[], @require_paths=["lib"], @required_ruby_version=#<Gem::Requirement:0x00005639ad0dbc80 @requirements=[[">=", #<Gem::Version "0">]]>, @required_rubygems_version=#<Gem::Requirement:0x00005639ad0dba50 @requirements=[[">=", #<Gem::Version "0">]]>, @requirements=[], @rubygems_version="3.2.33", @specification_version=4, @test_files=[], @new_platform="ruby", @full_name="win32-process-0.8.3", @has_rdoc=true, @license=["MIT"] win32-process-0.8.3>
  /home/runner/work/rubygems/rubygems/bundler/tmp/rubygems/lib/rubygems/specification.rb:2116:in `method_missing'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/remote_specification.rb:115:in `method_missing'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/lazy_specification.rb:34:in `eql?'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:189:in `eql?'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:189:in `search_by_dependency'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:96:in `local_search'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:64:in `unsorted_search'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/index.rb:60:in `search'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:179:in `results_for'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:113:in `search_for'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:216:in `block in sort_dependencies'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:207:in `each'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:207:in `sort_by'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:207:in `sort_dependencies'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:727:in `activate_new_spec'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:254:in `process_topmost_state'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb:182:in `resolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb:43:in `resolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:50:in `start'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/resolver.rb:24:in `resolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/definition.rb:480:in `reresolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/definition.rb:283:in `resolve'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/definition.rb:181:in `resolve_remotely!'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/lock.rb:53:in `run'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:674:in `lock'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:31:in `dispatch'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:25:in `start'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:48:in `block in <top (required)>'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:36:in `<top (required)>'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:23:in `load'
  /home/runner/work/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:23:in `<main>'
```
````

I think the issue is that now we eagerly materialize some base
specifications before resolving in order to give better errors if user
specified an incorrect source in the Gemfile.

This means that the key for the index hash will have heterogeneous
specification objects (some LazySpecification, some real Specification),
and `LazySpecification#eql?` is incompatible with that.

By dropping the base parameter from the index, we should no longer have
these heterogenous objects as hash keys.

https://github.com/rubygems/rubygems/commit/dc179d41c3
2022-07-27 03:08:36 +09:00
Hiroshi SHIBATA 9e6d07f346 Merge rubygems/bundler HEAD
Merge from 2af2520b4a
2022-07-26 14:38:17 +09:00
Peter Zhu ba098fa151 Sync RDoc 2022-07-25 16:29:14 -04:00
Takuya Noguchi 979368b47c [rubygems/rubygems] Bundler: add deprecation notice of viz to man
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/0e1cbfa598
2022-07-25 21:37:13 +09:00
Ashley Ellis Pierce 244bda7efd [rubygems/rubygems] Display mfa warnings on gem signin
https://github.com/rubygems/rubygems/commit/4dc77b7099

Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
2022-07-23 03:42:59 +09:00
Takuya Noguchi d77633a695 [rubygems/rubygems] Bundler: update command example in bundle-exec(1)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/28bf5c8b33
2022-07-23 00:24:37 +09:00
st0012 b3be030740 [ruby/reline] Rename dialog_pointer_* to dialog_highlight_*
"Pointer" is not what we usually use to describe a selected item.

"Highlight" is a more common word for the scenario so we should use it instead.

https://github.com/ruby/reline/commit/b4279d1557
2022-07-22 23:34:49 +09:00
Takuya Noguchi c6734edc34 [rubygems/rubygems] Remove bundle show from obsolete commands
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/6c07c9427b
2022-07-22 21:01:45 +09:00
Nobuyoshi Nakada a4e890b93e [rubygems/rubygems] Use `SystemExit#status` as `exit_code`
No reasons to manage separately.

https://github.com/rubygems/rubygems/commit/8ede5c886e
2022-07-22 21:01:31 +09:00
Takuya Noguchi d7ffd3fea4
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22 12:07:23 +09:00
David Rodríguez fa5724cca9 [rubygems/rubygems] Fix `ruby setup.rb --destdir /foo` modifying global specs
Running a command like that is actually removing any previous default
bundler specs in the default RubyGems installation (outside of destdir).
It should instead only modify destdir.

https://github.com/rubygems/rubygems/commit/5ed275383c
2022-07-20 19:55:34 +09:00
Takuya Noguchi cbaf58d455 [rubygems/rubygems] Bundler: update primary source in man 5 gemfile
Specifying multiple primary sources in top-level was deprecated in
Bundler 1.13.
As Bundler CLI uses primary source instead of global, "global source"
is replaced with "primary source".

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/1dd1753f6e
2022-07-20 19:45:08 +09:00
Takuya Noguchi 631b34ef95 [rubygems/rubygems] Bundler: change error/warning message for multiple global sources
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/316564b8fc
2022-07-19 23:51:47 +09:00
David Rodríguez fd0902bfcd [rubygems/rubygems] Move fileutils require to be even more lazy
If directories are already created (the common case), fileutils won't be
required at all.

https://github.com/rubygems/rubygems/commit/63a9b94fc9
2022-07-18 23:24:38 +09:00
Peter Zhu dd362a786a [ruby/rdoc] Fix call-seq for aliased method with similar names
deduplicate_call_seq has a bug that skips call-seq for methods where the
alias is a prefix of the method name. For example, if the alias name is
"each" and the current method name is "each_line", then
deduplicate_call_seq will skip all call-seq for "each_line" since it
will believe that it is for the alias.

https://github.com/ruby/rdoc/commit/1148988ccc
2022-07-18 22:36:57 +09:00
David Rodríguez a74634de10 [rubygems/rubygems] Fix upgrading RubyGems with a customized `Gem.default_dir`
https://github.com/rubygems/rubygems/commit/16d01f9486
2022-07-18 19:07:55 +09:00
David Rodríguez 01560e1c53 [rubygems/rubygems] Improve error message when gems cannot be found
Include the source of each gem.

https://github.com/rubygems/rubygems/commit/a0bed2fb79
2022-07-18 19:07:47 +09:00
Yuta Saito fab8f3bde6 [rubygems/rubygems] Stop using `/dev/null` for silent ui for WASI platform
WASI doesn't guarantee that `/dev/null` is present.
So without this patch, we needed to mount host's `/dev` directory to WASI
guest process to avoid `ENOTCAPABLE` error while `require "bundler/setup"`

https://github.com/rubygems/rubygems/commit/e9187ab61f
2022-07-17 19:44:51 +09:00
David Rodríguez ef2d673052 [rubygems/rubygems] Show a proper error if extension dir is not writable
Instead of showing the bug report template.

https://github.com/rubygems/rubygems/commit/0c8b6f7dd5
2022-07-17 17:47:23 +09:00
David Rodríguez 3cfc3fcf96 [rubygems/rubygems] Unify some common code
https://github.com/rubygems/rubygems/commit/972e8ff965
2022-07-17 17:47:22 +09:00
David Rodríguez 14f52cfce5 [rubygems/rubygems] Don't call `#build_extensions` at all if there are no extensions
https://github.com/rubygems/rubygems/commit/5ecc0e0b31
2022-07-17 17:47:22 +09:00
Nobuyoshi Nakada 5ae83151b1 [rubygems/rubygems] Drop support for old `Gem::Specification` versions
`specification_version` method was added before RubyGems 1.0, and
`add_runtime_dependency` method was before 1.2.  These seem aged
enough to remove.

https://github.com/rubygems/rubygems/commit/92770c5cd9
2022-07-16 19:33:16 +09:00
st0012 36ca0e58b6 [ruby/reline] Use color name instead of code (integer) in dialog color APIs
As pointed out in the
[comment](https://github.com/ruby/reline/pull/413#issuecomment-1168033973),
the code is actually a control sequence and not only for colors.

To make the dialog color APIs safer to use, we should restrict its
usages and extract away the bg/fg concept from the input.

So in this commit, I made these changes:

1. The dialog_*_bg/fg_color APIs only takes and returns color names (symbol):
  - :black
  - :red
  - :green
  - :yellow
  - :blue
  - :magenta
  - :cyan
  - :white
2. Add additional dialog_*_bg/fg_color_sequence APIs to access the raw code.

https://github.com/ruby/reline/commit/b32a977766
2022-07-16 02:30:23 +09:00
Takuya Noguchi 7fda741f6e [rubygems/rubygems] Use https protocol for URLs for config mirror
example.org is used mirror URL as an example, not to make access to
a (potential) third-party domain.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/31230f850c
2022-07-15 18:45:38 +09:00
Takuya Noguchi 8e451d1083 [rubygems/rubygems] Fix wrong information about default RubyGems source
Also fix regression from rubygems/rubygems PR 3056

https://my.diffend.io/gems/rubygems-update/1.3.5/1.3.6/page/4#d2h-514986
https://my.diffend.io/gems/rubygems-update/2.0.0/2.0.2/page/2#d2h-514986

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/06b1e9ebc5
2022-07-15 17:32:05 +09:00
Nobuyoshi Nakada 025677560a [ruby/un] Support `FileUtils.cp_lr`
https://github.com/ruby/un/commit/e976ad8a7c
2022-07-14 16:26:47 +09:00
Olle Jonsson 7c58c55c11 [ruby/timeout] gemspec: Drop unused directives "executables"
This gem exposes no executables.

https://github.com/ruby/timeout/commit/70be2bd48a
2022-07-14 16:21:25 +09:00
David Rodríguez 76de7a92b9 [rubygems/rubygems] Fix misleading error if compact index cannot be copied
Previously if `~/.bundle/cache/compact_index/rubygems.org.*/version`
were owned by root with read-only access, `bundle install` would fail
with a misleading error message. For example:

```
There was an error while trying to write to `/tmp/bundler-compact-index-20220711-1823-npllre/versions`. It is
likely that you need to grant write permissions for that path.
```

This happened because the EACCESS error was caught by
`SharedHelpers.filesystem_access`, which makes it look like the target
directory is at fault instead of the source.

We can't simply drop this guard because that causes the opposite
problem: the permission error appears to come from the source instead of
the target, since `CompactIndexClient::Cache#lines` also wraps read
access errors.

Instead, bring a minimal implementation of `FileUtils.cp` and nest calls
to `SharedHelpers.filesystem_access` properly.

https://github.com/rubygems/rubygems/commit/320822c070

Co-authored-by: Stan Hu <stanhu@gmail.com>
2022-07-14 15:06:09 +09:00
David Rodríguez 8c74eaa08d [rubygems/rubygems] Fix `gem update --system` crash while regenerating binstubs
Since a few commits ago, we no longer call `Gem::Specification.reset`
after each invocation of `Gem::Installer#install`. This means we don't
call it when the default Bundler is installed during `gem update
--system`. This causes no issues until the end of the upgrade process
when:

* The previous default Bundler spec is removed from disk.
* All specification stubs are turned into real specifications by loading
  them from disk. But the one for Bundler no longer exists so
  materializes to `nil` and regenerating binstubs crashes like this:

  ```
  Bundler 2.4.0.dev installed
  RubyGems 3.4.0.dev installed
  Regenerating binstubs
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `platform' for nil:NilClass
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `block in execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:981:in `block in each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `map'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `select'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:301:in `invoke'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:604:in `regenerate_binstubs'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:183:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:185:in `process_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:149:in `run'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:51:in `run'
  setup.rb:33:in `<main>'
  ```

We fix it by more carefully managing the removal of the previous default
Bundler gem.

https://github.com/rubygems/rubygems/commit/9989f6d5af
2022-07-14 04:47:58 +09:00
Jean Boussier 8290d76647 [ruby/timeout] Give a name to the background thread
https://github.com/ruby/timeout/commit/5594ae2f4d
2022-07-13 21:16:15 +09:00
Hiroshi SHIBATA 437a5ae9d6 Merge RubyGems and Bundler master 2022-07-13 14:11:55 +09:00
Burdette Lamar 66dfcbed37 [ruby/irb] [DOC] Include updated help message (https://github.com/ruby/irb/pull/377)
* Include updated help message

https://github.com/ruby/irb/commit/ff129f3794
2022-07-12 00:05:15 +09:00
Nobuyoshi Nakada b564ef3698 [ruby/rdoc] Fix the known classes more
https://github.com/ruby/rdoc/commit/9f47234e0e
2022-07-11 13:43:14 +09:00
Nobuyoshi Nakada 86df6f4bb3 [ruby/rdoc] Fix an exception class name
https://github.com/ruby/rdoc/commit/87301da71b
2022-07-11 13:14:06 +09:00
Burdette Lamar 55c5bf27f5 [ruby/irb] Additions/revisions to help-message (https://github.com/ruby/irb/pull/370)
Changed:

    Added text to options that said just 'same as ruby -whatever'.
    Added defaults.
    Removed an errant tab.

https://github.com/ruby/irb/commit/dfe454cc33
2022-07-08 03:15:47 +09:00
Burdette Lamar 7ba5c0633c [ruby/pstore] Emphasize keys instead of roots, values instead of objects (https://github.com/ruby/pstore/pull/7)
Modifies RDoc to Emphasize keys instead of roots, values instead of objects.

Code:

    Renames method #root? to #key? and method #roots to #keys.
    Aliases method #key as #root and method #keys as #roots.
    Adds testing for all four methods.

https://github.com/ruby/pstore/commit/4436ea0891
2022-07-07 07:05:01 +09:00
Brian Le 902d1a5c51 [rubygems/rubygems] add message when gems are requested to be updated but they are not installed
https://github.com/rubygems/rubygems/commit/27953ffe9a
2022-07-06 02:59:14 +09:00
Brian Le 6eab8095fa [rubygems/rubygems] output gems already up-to-date regardless if any gems were updated
https://github.com/rubygems/rubygems/commit/4ec608a573
2022-07-06 02:59:13 +09:00
BurdetteLamar 558a9244e9 [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/cb2b9dc9a9
2022-07-02 21:49:13 +09:00
BurdetteLamar 7e8fd40c06 [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/7e56730689
2022-07-02 21:49:13 +09:00
BurdetteLamar d7419354ac [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/23a7f5468f
2022-07-02 21:49:12 +09:00
BurdetteLamar 6f26a6cdef [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/c12560e59a
2022-07-02 21:49:11 +09:00
BurdetteLamar ce5aa6d4af [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/117177c226
2022-07-02 21:49:10 +09:00
BurdetteLamar 2dafa0470b [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/8f9843ef19
2022-07-02 21:49:09 +09:00
BurdetteLamar 902563a827 [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/8de41c1eed
2022-07-02 21:49:09 +09:00
BurdetteLamar 6eeb774ab1 [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/c59d4a063e
2022-07-02 21:49:08 +09:00
BurdetteLamar 8715ecd04b [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/81a266d88c
2022-07-02 21:49:07 +09:00
David Rodríguez 7b78aba53a [rubygems/rubygems] Account for default gems not having remote when caching
https://github.com/rubygems/rubygems/commit/b93d4de2ff
2022-07-02 19:41:02 +09:00
David Rodríguez 9101269e94 [rubygems/rubygems] Move rubygems source specific logic to rubygems source
https://github.com/rubygems/rubygems/commit/6aa4c422a7
2022-07-02 19:41:02 +09:00
David Rodríguez b0c639f249 [rubygems/rubygems] Fix unintended double spaces in DSL documentation
https://github.com/rubygems/rubygems/commit/b1826876d0
2022-06-30 18:55:44 +09:00
David Rodríguez 95bfea6648 [rubygems/rubygems] Use modern style hashes in Gemfile DSL docs
https://github.com/rubygems/rubygems/commit/3f83236c02
2022-06-30 04:11:17 +09:00
David Rodríguez a16de43f23 [rubygems/rubygems] Add `gem env user_gemhome` and `gem env user_gemdir`
https://github.com/rubygems/rubygems/commit/14d3f80df6
2022-06-29 03:25:46 +09:00
David Rodríguez 1098fdf890 [rubygems/rubygems] Also document `gem env` argument aliases
https://github.com/rubygems/rubygems/commit/6d841ccbd4
2022-06-29 03:25:45 +09:00
David Rodríguez 7a33d3df6a [rubygems/rubygems] Document better names for `gem env` arguments
I think `gem env home` and `gem env path` read very nice.

https://github.com/rubygems/rubygems/commit/b89da79456
2022-06-29 03:25:45 +09:00
Burdette Lamar 59273ff6e2 [ruby/fileutils] [DOC] Changes to examples (https://github.com/ruby/fileutils/pull/96)
* Changes to examples

https://github.com/ruby/fileutils/commit/346a71b2cb
2022-06-29 00:39:59 +09:00
st0012 7d211c93af [ruby/irb] Color.colorable? needs to consider the condition when irb is not loaded
ruby/debug uses `irb/color` selectively:
0ac22406bb/lib/debug/color.rb (L4)

And in that case, `IRB.conf` won't be defined. So Color.colorable? needs
to consider that.

This also fixes the Ruby trunk CI.

https://github.com/ruby/irb/commit/b2cd07e795
2022-06-28 22:57:17 +09:00
Stan Lo 44c1316293 [ruby/irb] Centralize coloring control (https://github.com/ruby/irb/pull/374)
* Use colorable: argument as the only coloring control

* Centalize color controling logic at Color.colorable?

There are 2 requirements for coloring output:

1. It's supported on the platform
2. The user wants it: `IRB.conf[:USE_COLORIZE] == true`

Right now we check 1 and 2 separately whenever we colorize things.
But it's error-prone because while 1 is the default of `colorable`
parameter, 2 always need to manually checked. When 2 is overlooked, it
causes issues like https://github.com/ruby/irb/pull/362

And there's 0 case where we may want to colorize even when the user
disables it. So I think we should merge 2 into `Color.colorable?` so it
can be automatically picked up.

* Add tests for all inspect modes

* Simplify inspectors' coloring logic

* Replace use_colorize? with Color.colorable?

* Remove Context#use_colorize cause it's redundant

https://github.com/ruby/irb/commit/1c53023ac4
2022-06-28 22:30:42 +09:00
Nobuyoshi Nakada 5ccdcd8168 [ruby/rdoc] Remove dead code
https://github.com/ruby/rdoc/commit/f727854bd5
2022-06-28 21:24:59 +09:00
Nobuyoshi Nakada 131422ceea [ruby/rdoc] Support attributes defined by `rb_struct_define`
https://github.com/ruby/rdoc/commit/854b370763
2022-06-28 20:17:30 +09:00
Nobuyoshi Nakada 98bf8c83fa [ruby/rdoc] Refinement is added since ruby 3.1
https://github.com/ruby/rdoc/commit/c051eb90d1
2022-06-28 15:49:05 +09:00
Nobuyoshi Nakada 51be2cf6d2 [ruby/rdoc] Parse also InitVM-prefixed functions
Initialization depending on VM is separated.

https://github.com/ruby/rdoc/commit/030d10fccd
2022-06-28 14:51:49 +09:00
David Rodríguez f9f85a513b [rubygems/rubygems] Print error messages just once in verbose mode
When running a command with the `--verbose` flag that ends up raising a
`BundlerError`, Bundler will unnecessarily print the error twice.

This commit fixes the issue by removing the duplicate logging.

https://github.com/rubygems/rubygems/commit/689004a164
2022-06-27 23:35:45 +09:00
pocari 8c6c3e30f3 [ruby/reline] Enable to change the background color of dialogs. (https://github.com/ruby/reline/pull/413)
https://github.com/ruby/reline/commit/bd49537964
2022-06-27 22:28:49 +09:00
David Rodríguez f83c5de6d5 [rubygems/rubygems] Improve error message when `operating_system.rb` fails to load
Show an absolute path instead of an unhelpful relative path.

https://github.com/rubygems/rubygems/commit/f1eed36e2f
2022-06-27 17:03:24 +09:00
Peter Jones e0bfdb23af [ruby/irb] Ensure stdout is a TTY before calling winsize
When outputting a (possibly truncated) value, IRB will query the
window size.  However, if IRB was piped to another process, stdout
will no longer be a TTY and will not support the `winsize` method.

This fix ensure that stdout is a TTY.

https://github.com/ruby/irb/commit/125de5eeea
2022-06-26 14:40:48 +09:00
Tomas Volf 56809537a4 [rubygems/rubygems] Clean up temporary directory after generate_index --update
While generate_index did clean up temporary directory, when running with
--update flag, that did not happen and the temporary directory was left
behind.

This commit fixes that and modifies tests in order to make sure this is
not reintroduced later on.

Fixes #5635.

https://github.com/rubygems/rubygems/commit/9fa34dc329
2022-06-26 11:15:43 +09:00
David Rodríguez 12a5fa408b Sync RubyGems & Bundler with upstream repo 2022-06-24 10:52:02 +09:00
David Rodríguez 6f229da2c0 [rubygems/rubygems] Fix standalone script generation for statically linked dev ruby
https://github.com/rubygems/rubygems/commit/4d0d7b3c97
2022-06-23 18:17:37 +09:00
David Rodríguez 4f5eb48dea [rubygems/rubygems] Fix `bundle package --no-install` no longer skipping install
This is a regression from https://github.com/rubygems/rubygems/commit/cf749f8ffabd. The
funny thing is that we have a spec for this feature, so it was unclear
how we regressed here. It turns out there was a bug in one of our
negative matchers checking that gems ARE NOT included in a bundle.

This commit fixes the bug in the negative matcher and reverts
https://github.com/rubygems/rubygems/commit/cf749f8ffabd (with a slightly simpler diff).

https://github.com/rubygems/rubygems/commit/3f9a4ff32a
2022-06-23 18:17:08 +09:00
Takuya Noguchi 812354ace4 [rubygems/rubygems] Bundler: fix man page for bundle-add
Follows up https://github.com/rubygems/bundler/pull/5610

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/0c4df2b8ca
2022-06-22 13:40:21 +09:00
Burdette Lamar fdd1102550 [ruby/fileutils] Clarify difference between cp_r and install (https://github.com/ruby/fileutils/pull/95)
https://github.com/ruby/fileutils/commit/94a599e69f
2022-06-22 02:23:10 +09:00
Burdette Lamar 2e81fd764b [ruby/fileutils] Correct method references for secure removal (https://github.com/ruby/fileutils/pull/93)
https://github.com/ruby/fileutils/commit/42c9685826
2022-06-21 23:16:24 +09:00
Burdette Lamar 1002998c6d [ruby/fileutils] [DOC] Adding 'Related' (https://github.com/ruby/fileutils/pull/92)
https://github.com/ruby/fileutils/commit/fc3cc28397
2022-06-21 22:42:39 +09:00
Peter Zhu 5ca2335802 [ruby/irb] [DOC] Fix formatting in docs
https://github.com/ruby/irb/commit/3ddc89e38c
2022-06-20 22:42:30 +09:00
Stan Lo 2d4a41df6b [ruby/irb] Commands should respect `USE_COLORIZE` config (https://github.com/ruby/irb/pull/362)
https://github.com/ruby/irb/commit/534688dfc4
2022-06-20 22:27:30 +09:00
citrusmoose 8d689294d0 [rubygems/rubygems] Fix extension paths in generated standalone script
The paths for extensions of gems would contain the hardcoded ruby
version on which the extension was built. This will replace it with
runtime ruby version like the parent version directory. It will make the
standalone script compatible between different ruby version installations.

https://github.com/rubygems/rubygems/commit/a9dae93d5d
2022-06-20 16:04:47 +09:00
Josh Nichols aeab405878 [rubygems/rubygems] Improve performance of Bundler::SpecSet#for by using hash lookup of handled deps
I was looking at (yet another) flamegraph in speedscope, and used the
'left hand heavy' and was shocked to realize that 0.5s of the 1.7s
is spent in DepProxy#name. This method _only_ delegates the name to an
underlying spec, so it's not complex at all.

It seems to be of how often this line ends up calling it:

     next if handled.any?{|d| d.name == dep.name && (match_current_platform || d.__platform == dep.__platform) } || dep.name == "bundler"

The `handled` array is built up as dependencies are handled, so this get
slower as more dependencies are installed.

This change changes how `handled` is track. Instead of just an array, I've
tried using a Hash, with the key being a dep's name, and the value being
a list of deps with that name. This means it's constant time to find
the dependencies with the same name.

I saw a drop from 1.7s to 1.0s against master, and from 0.95s to 0.24s
when used with https://github.com/rubygems/rubygems/pull/5533

https://github.com/rubygems/rubygems/commit/844dac30d4
2022-06-20 02:34:41 +09:00
Burdette Lamar 9327b6f222 [ruby/fileutils] [DOC] Revisions for module-level doc (https://github.com/ruby/fileutils/pull/90)
* Revisions for module-level doc

https://github.com/ruby/fileutils/commit/dcbad90a1f
2022-06-17 22:36:26 +09:00
David Rodríguez 1e8bf48fd5 [rubygems/rubygems] Bring TODO message up to date
https://github.com/rubygems/rubygems/commit/e07dba0923
2022-06-17 17:05:21 +09:00
David Rodríguez 5450b409fc [rubygems/rubygems] Remove part of comment that fell out of date
https://github.com/rubygems/rubygems/commit/272ac23aa8
2022-06-17 17:05:20 +09:00
David Rodríguez 8855b68f97 [rubygems/rubygems] Don't modify RbConfig at all when building extensions
Instead, pass sitearchdir and sitelibdir directly to `make`.

This also removes the need to create and use the siteconf file at all
when generating makefiles.

https://github.com/rubygems/rubygems/commit/dea41fa2dc
2022-06-17 17:05:20 +09:00
David Rodríguez 1aaeff8e36 [rubygems/rubygems] Remove unnecessary condition
This variable can't be falsy.

https://github.com/rubygems/rubygems/commit/b838f9a6f0
2022-06-17 17:05:19 +09:00
David Rodríguez 5a385677f3 [rubygems/rubygems] No need to change `RbConfig::CONFIG` at all
Only `RbConfig::MAKEFILE_CONFIG` is actually used.

https://github.com/rubygems/rubygems/commit/b767cc0929
2022-06-17 17:05:19 +09:00
Burdette Lamar 0ab2bca11c [ruby/fileutils] [DOC] Small tweaks (https://github.com/ruby/fileutils/pull/89)
https://github.com/ruby/fileutils/commit/13ab96439b
2022-06-16 23:56:37 +09:00
Shishir Joshi c310691dd8 [ruby/net-http] Make `Net::HTTPHeader#content_range` return nil on non-byte units
* Returning nil from the `content_range` method instead of raising an
  error when the unit in the content-range header is not "bytes".

Fix https://bugs.ruby-lang.org/issues/11450

https://github.com/ruby/net-http/commit/0b5030dd86

Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-06-16 23:35:27 +09:00
Nobuyoshi Nakada 2223eb082a
Revert "HTTPHeader.content_range throws error on non-byte units"
This reverts commit 63546bfc15.
2022-06-16 22:10:59 +09:00
Nobuyoshi Nakada 1cc64a5514 [ruby/racc] Fix flag to `Regexp.new`
Probably intended to pass encoding "none".

https://github.com/ruby/racc/commit/65cd26efd8
2022-06-16 21:43:53 +09:00
Shishir Joshi 63546bfc15
HTTPHeader.content_range throws error on non-byte units
* Added a nil check in Net::HTTPHeader#initialize_http_header for keys in the header that do not have any value
* Returning nil from the content_range method instead of raising an error when the unit in the content-range header is not bytes
* Modified initialize_http_header to match trunk

fix [Bug #11450]
fix https://github.com/ruby/ruby/pull/1018
2022-06-16 20:16:47 +09:00
Burdette Lamar 1e8fed2d2a [ruby/fileutils] [DOC] More on paths and lists (https://github.com/ruby/fileutils/pull/88)
https://github.com/ruby/fileutils/commit/ba3ae2430d
2022-06-16 05:56:39 +09:00
Burdette Lamar 788a5e14fa [ruby/fileutils] [DOC] More on cp_r (https://github.com/ruby/fileutils/pull/87)
* More on cp_r

https://github.com/ruby/fileutils/commit/82a2b62578
2022-06-15 05:42:26 +09:00
Burdette Lamar 9b9cc8ad34 [ruby/fileutils] [DOC] More on paths and lists (https://github.com/ruby/fileutils/pull/86)
* More on paths and lists

https://github.com/ruby/fileutils/commit/c3d92d34f4
2022-06-14 22:52:22 +09:00
Burdette Lamar 9a381c240c [ruby/fileutils] [DOC] Clarify path arguments (https://github.com/ruby/fileutils/pull/85)
https://github.com/ruby/fileutils/commit/5f9ef9ddc8
2022-06-14 00:39:44 +09:00
Burdette Lamar 753da6deca [ruby/fileutils] [DOC] Enhanced Rdoc (https://github.com/ruby/fileutils/pull/84)
Treats:

    ::chown_R
    ::touch
    ::commands
    ::options
    ::have_option?
    ::options_of
    ::collect_method

https://github.com/ruby/fileutils/commit/5df0324f52
2022-06-13 21:11:45 +09:00
st0012 b1397e96da [ruby/reline] Revert "Merge pull request #441 from nevans/workaround-linker-script-so"
This reverts commit https://github.com/ruby/reline/commit/4ccf128ffa18, reversing
changes made to https://github.com/ruby/reline/commit/a2651419e9a0.

https://github.com/ruby/reline/commit/51053138a4
2022-06-13 19:33:15 +09:00
Nobuyoshi Nakada d9ccb6b372 [ruby/reline] Check the ambiguous char width only on tty
It sent the char to check even to non-tty, e.g., pipe.
This causes `unknown command: "\xE2\x96\xBDstart ` warnings on
ruby's parallel test on Windows, where non-standard FDs cannot be
passed to child processes.

https://github.com/ruby/reline/commit/0d373647fb
2022-06-13 12:17:04 +09:00
David Rodríguez d0bf31e6cf [rubygems/rubygems] Don't on gemspecs with invalid `require_paths`, just warn
These gemspecs already work most of the times. When they are installed
normally, the require_paths in the gemspec stub line becomes actually
correct, and the incorrect value in the real gemspec is ignored. It only
becomes an issue in standalone mode.

In Ruby 3.2, `Kernel#=~` has been removed, and that means that it
becomes harder for us to gracefully deal with this error in standalone
mode, because it now happens earlier due to calling `Array#=~` for this
invalid gemspec (since require_paths is incorrectly an array of arrays).

The easiest way to fix this is to actually make this just work instead
by automatically fixing the issue when reading the packaged gemspec.

https://github.com/rubygems/rubygems/commit/d3f2fe6d26
2022-06-12 02:02:20 +09:00
David Rodríguez 7f9eb888a3 [rubygems/rubygems] Reuse package from the installer for extracting the specification
Previously we would instantiate two different packages and extract the
specification from the package twice for each gem installed. We can
reuse the installer for this so that we just need to do it once.

https://github.com/rubygems/rubygems/commit/e454f850b1
2022-06-11 18:43:28 +09:00
David Rodríguez 965c314e34 [rubygems/rubygems] Move security exception handling to the only place using it
https://github.com/rubygems/rubygems/commit/ba975b3b7f
2022-06-11 18:43:27 +09:00
David Rodríguez bf8dc36e40 [rubygems/rubygems] Swapping should not raise any errors
https://github.com/rubygems/rubygems/commit/600a9ac658
2022-06-11 18:43:27 +09:00
David Rodríguez 6292b36529 [rubygems/rubygems] Remove unclear comment
This is the explanation of why we do the swapping, not of why we
download the gem.

https://github.com/rubygems/rubygems/commit/1a25eb7e7b
2022-06-11 18:43:26 +09:00
David Rodríguez 52cc76d134 [rubygems/rubygems] `Gem::Specification.loaded_from` is already set by the installer
https://github.com/rubygems/rubygems/commit/796eebfdbf
2022-06-11 18:43:26 +09:00
David Rodríguez 22c97ab8ae [rubygems/rubygems] Refactor some more duplicated logic
https://github.com/rubygems/rubygems/commit/9bd389e1b6
2022-06-11 18:43:25 +09:00
David Rodríguez 95f5194b3c [rubygems/rubygems] Move `no_install` setting check to a more sensible place
It's only related to the `bundle cache` command, so it should be checked
there.

https://github.com/rubygems/rubygems/commit/cf749f8ffa
2022-06-11 18:43:25 +09:00
David Rodríguez 3f69774b76 [rubygems/rubygems] No need to redownload if package already there
https://github.com/rubygems/rubygems/commit/285ccbc07e
2022-06-11 18:43:24 +09:00
David Rodríguez a9077af75b [rubygems/rubygems] No need to overwrite path when there's a remote
https://github.com/rubygems/rubygems/commit/d86fb2c316
2022-06-11 18:43:24 +09:00
David Rodríguez 870e5a39d5 [rubygems/rubygems] Remove another unnecessary require
https://github.com/rubygems/rubygems/commit/04e6a5ae31
2022-06-11 18:43:24 +09:00
David Rodríguez 692fec4e72 [rubygems/rubygems] Simplify `Gem::Security::Exception` handling
These days all these errors are raised as `Gem::Security::Exception` so
there's no need to do any matching on the exception message.

https://github.com/rubygems/rubygems/commit/bd3403da57
2022-06-11 18:43:23 +09:00
David Rodríguez 572f3240fe [rubygems/rubygems] Remove unnecessary require
The `security_policies` method already requires it.

https://github.com/rubygems/rubygems/commit/d19b088f2f
2022-06-11 18:43:23 +09:00
David Rodríguez 4a75849680 [rubygems/rubygems] Remove unnecessary `spec.remote` guard
It's checked before calling the method already.

https://github.com/rubygems/rubygems/commit/4eb00e9586
2022-06-11 18:43:22 +09:00
David Rodríguez d5288c8aad [rubygems/rubygems] Refactor ambiguous gems check
https://github.com/rubygems/rubygems/commit/a00c79a4da
2022-06-11 18:43:22 +09:00
Burdette Lamar 44b3daa0d7 [ruby/fileutils] Enhanced RDoc (https://github.com/ruby/fileutils/pull/83)
Treats ::chmod_R and ::chown.

https://github.com/ruby/fileutils/commit/df4ac84bef
2022-06-11 06:41:27 +09:00
Burdette Lamar c2468fd88b [ruby/fileutils] Enhanced RDoc (https://github.com/ruby/fileutils/pull/82)
Treats ::chmod; adds Pathname usage to ::install.

https://github.com/ruby/fileutils/commit/9db4cb129c
2022-06-10 05:03:33 +09:00
Jean Boussier 4e21b19a61 [ruby/timeout] Keep a private reference to `Process.clock_gettime`
`timeout 0.3.0` broke our test suite because we have some
tests that stubs `Process.clock_gettime` making it return
a value in the past, causing `Timeout` to trigger almost immediately.

I beleive it wasn't a problem before because it was relying on `Process.sleep`.

https://github.com/ruby/timeout/commit/e5911a303e
2022-06-09 18:58:49 +09:00
Burdette Lamar 9b7208fca1 [ruby/fileutils] [DOC] Enhanced RDoc (https://github.com/ruby/fileutils/pull/81)
https://github.com/ruby/fileutils/commit/b9d5a79e38
2022-06-09 05:38:09 +09:00
Burdette Lamar a07acbe417 [ruby/fileutils] File trees (https://github.com/ruby/fileutils/pull/80)
Adds a note about file tree examples.

https://github.com/ruby/fileutils/commit/65ac65067a
2022-06-08 21:35:00 +09:00
Daniel Berger deff9e2699 [rubygems/rubygems] Remove unnecessary string concatenation
https://github.com/rubygems/rubygems/commit/81ccb3ab89
2022-06-07 23:18:31 +09:00
Yusuke Endoh f075be3dcb [ruby/error_highlight] Use Exception#detailed_message instead of overriding #message (https://github.com/ruby/error_highlight/pull/24)
See https://bugs.ruby-lang.org/issues/18564.
Ref: https://github.com/ruby/did_you_mean/pull/177

https://github.com/ruby/error_highlight/commit/671b7c61b2
2022-06-07 17:40:19 +09:00
Hiroshi SHIBATA 11b9dd8ccb
Manually merged https://github.com/ruby/did_you_mean/pull/177 2022-06-07 15:24:48 +09:00
Nobuyoshi Nakada 082c2d1b05 [ruby/rdoc] [DOC] Undocument internal constants [ci skip]
https://github.com/ruby/rdoc/commit/6d7bf24bb8
2022-06-07 11:44:58 +09:00
Nobuyoshi Nakada dbfb3b1917 [ruby/rdoc] Allow boolean arguments to `rb_attr` and `rb_define_attr`
Currently only literal `0` and `1` are accepted as `read`/`write`
flags.
This patch allows other boolean arguments, C macros (`FALSE`/`TRUE`),
Ruby `VALUE`s (`Qfalse`/`Qtrue`), and C99 `bool`s (`false`/`true`), as
well.

https://github.com/ruby/rdoc/commit/169dc02e3c
2022-06-07 10:42:10 +09:00
Burdette Lamar b737998d25 [ruby/fileutils] [DOC] Enhanced RDoc for FileUtils (https://github.com/ruby/fileutils/pull/78)
Treats:
    ::rm
    ::rm_f
    ::rm_r
    ::rm_rf
    ::remove_entry_secure

https://github.com/ruby/fileutils/commit/ce2a438d75
2022-06-07 00:37:31 +09:00
Alexander Ilyin 6fc16e748e [ruby/open-uri] [DOC] Fix markup for `URI.open`
* Add missing slash.

https://github.com/ruby/open-uri/commit/40023e63da
2022-06-07 00:06:56 +09:00
David Rodríguez ba38318827 [rubygems/rubygems] Unify loading `Gem::Requirement`
It was being explicitly required from `Gem::Specification` but also a
strange autoload was set for it at `Gem::Version`. The autoload was non
standard because it should've been done in the `Gem` module, not in
`Gem::Specification`, since that's where the constant is expected to get
defined. Doing this might get deprecated in the future, and it was not
being effective anyways due to the explicit require.

Unify everything with an `autoload` at the right place.

https://github.com/rubygems/rubygems/commit/174ea3e24c
2022-06-06 18:36:31 +09:00
Pavel Rosický 4bc7cef866
[ruby/cgi] jruby support
https://github.com/ruby/cgi/commit/93326fb622
2022-06-06 18:13:01 +09:00
Nobuyoshi Nakada 5460675bbc [ruby/rdoc] Use command array form of `IO.popen` always
So that an exception raises by non-existent command, not via shell.

https://github.com/ruby/rdoc/commit/fd94dce69d
2022-06-04 20:32:27 +09:00
Nobuyoshi Nakada 2e6aee6ef2 [ruby/rdoc] Make all documents at the top level `extra_rdoc_files` [ci skip]
https://github.com/ruby/rdoc/commit/6b1a011243
2022-06-04 16:53:12 +09:00
Nobuyoshi Nakada 9a7be959b1 [ruby/rdoc] Remove `RDoc::RI::Driver#in_path?`
https://github.com/ruby/rdoc/commit/83051403d6
2022-06-04 16:42:10 +09:00
Nobuyoshi Nakada 323acd263a [ruby/rdoc] Stop checking if pager command found
`IO.popen` does that job.

https://github.com/ruby/rdoc/commit/3bbbc5ac84
2022-06-04 16:42:08 +09:00
Nobuyoshi Nakada 76479de159 [ruby/rdoc] Remove never used win32console
https://github.com/ruby/rdoc/commit/47a1aef447
2022-06-04 16:40:19 +09:00
David Rodríguez 4eb140b0e4 [rubygems/rubygems] Remove redundant bitwise AND
https://github.com/rubygems/rubygems/commit/a20bac7924
2022-06-02 22:23:42 +09:00
Ellen Marie Dash 1177665e62 [rubygems/rubygems] Fix `bundle remove` by invalidating cached `Bundle.defintion`.
Prior to this commit, `bundle add GEM_NAME` updated the lockfile,
but `bundle remove GEM_NAME` left GEM_NAME in the lockfile.

By invalidating the cached `Bundle.definition`, the existing code
handles that without a problem.

https://github.com/rubygems/rubygems/commit/aa0794d6a9
2022-06-01 19:01:18 +09:00
David Rodríguez 0a6b9924bd [rubygems/rubygems] Fix generated standalone script for default gems
The installer is actually rewriting the spec's full gem path to be the
one of the newly installed gem, however the accessor was not properly
working for `StubSpecification` instances, and default gems are always
of this type, because they are always present locally.

Fix the accessor to properly update the underlying full specification.

https://github.com/rubygems/rubygems/commit/efa41babfa
2022-06-01 17:07:35 +09:00
David Rodríguez f5b88d93ae [rubygems/rubygems] Remove code that seems unnecessary
This change was never covered with a spec, and we have recently covered
the case of partially deleted gems with specs and it works fine
(installation is "auto-healed").

https://github.com/rubygems/rubygems/commit/6e66ee4235
2022-06-01 17:07:34 +09:00
David Rodríguez 8381c568e7 [rubygems/rubygems] Restore ability to load old marshalled gemspec that use `YAML::PrivateType`
This issue was not detected because when all traces of old YAML parser
and emitter `Syck` were removed, this null-type.gemspec.rz marshalled
gemspec was updated to no longer load `YAML::Syck::PrivateType` but load
`Psych::PrivateType` instead.

However, realworld old marshalled gemspecs still use the
`YAML::PrivateType` constant, so this commit replaces the gemspec to be
the real pry-0.4.7 marshalled gemspec, so that it catches this issue.

https://github.com/rubygems/rubygems/commit/51b330b8d2
2022-06-01 17:06:52 +09:00
David Rodríguez ebb534801f [rubygems/rubygems] Remove no longer needed `Psych::PrivateType` cleanup
This old bug used to affect the `rubyforge_project` field in serialized
gemspecs. However, this field has been removed and it's no longer
present in marshaled loaded gemspecs.

So, while the constant is still present in these marshalled gemspecs and
we still need to make sure it exists, we no longer need to clean it up
from the loaded data.

https://github.com/rubygems/rubygems/commit/09df18e522
2022-06-01 17:06:51 +09:00
David Rodríguez fd83b8887f [rubygems/rubygems] Skip duplicated dependency warning for gemspec dev deps
Generally this warning is skipped for gemspec development dependencies.
I think because it's common to override them in the Gemfile to change
the source, for example.

But the order of conditions was not correct and the warning was still
being printed in one case.

https://github.com/rubygems/rubygems/commit/da9d1d6a3f
2022-06-01 00:14:31 +09:00
David Rodríguez e2b421d679 [rubygems/rubygems] Give better conflict resolution advice
This alternative really uses only the Gemfile, and can never end up
being absurd, because it will never be suggested when there's no
lockfile, and it suggests deleting the lockfile.

https://github.com/rubygems/rubygems/commit/5d154dd50e
2022-05-31 16:13:52 +09:00
Burdette Lamar c50c9d4051 [ruby/fileutils] [DOC] Enhanced RDoc (https://github.com/ruby/fileutils/pull/77)
Treats:
    ::copy_entry
    ::copy_file
    ::copy_stream
    ::mv

https://github.com/ruby/fileutils/commit/d6d7e5330d
2022-05-31 02:30:07 +09:00
David Rodríguez d6684f063b [rubygems/rubygems] Fix crash when commenting out a mirror in configuration
https://github.com/rubygems/rubygems/commit/2d99277328
2022-05-30 17:43:12 +09:00
David Rodríguez ea31c5bcd1 [rubygems/rubygems] Fix crash when installing gems with symlinks
If BUNDLE_PATH is configured to a symlinked path, installing gems with
symlinks would crash with an error like this:

```
Gem::Package::SymlinkError: installing symlink 'man/man0/README.markdown' pointing to parent path /usr/home/stevewi/srv/mail/lib/tools/.vendor/ruby/3.1.0/gems/binman-5.1.0/README.markdown of /srv/mail/lib/tools/.vendor/ruby/3.1.0/gems/binman-5.1.0 is not allowed
```

This commit fixes the problem by changing the bundle path to be the
realpath of the configured value, right after we're sure the path has
been created.

https://github.com/rubygems/rubygems/commit/3cd3dd142a
2022-05-30 17:42:39 +09:00
David Rodríguez 0a974e4700 [rubygems/rubygems] Remove seemingly unnecessary code
https://github.com/rubygems/rubygems/commit/f5dd5204ca
2022-05-30 17:42:37 +09: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 6e3295e554 [rubygems/rubygems] Make code to find target update version easier to follow
https://github.com/rubygems/rubygems/commit/a7f81cc7ee
2022-05-28 19:22:54 +09:00
David Rodríguez e9c4e37f1f [rubygems/rubygems] Remove unnecessary name and platform filter
It's already done before.

https://github.com/rubygems/rubygems/commit/49d28cfde5
2022-05-28 19:22:53 +09:00
David Rodríguez e78c1ddb1e [rubygems/rubygems] Fix rubygems update when non default `--install-dir` is configured
https://github.com/rubygems/rubygems/commit/9f3b21192d
2022-05-28 19:22:15 +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
Burdette Lamar 012eb9b70d [ruby/fileutils] [DOC] Enhanced RDoc for copy_entry (https://github.com/ruby/fileutils/pull/76)
https://github.com/ruby/fileutils/commit/27a3c376c7
2022-05-26 07:08:26 +09:00
Nobuyoshi Nakada cd6f87eefc [ruby/timeout] Set the flag surely before return
https://github.com/ruby/timeout/commit/f3a31abdfb
2022-05-25 19:50:47 +09:00
Nobuyoshi Nakada 8006a15edf [ruby/timeout] Add epoch.rake [ci skip]
https://github.com/ruby/timeout/commit/5153ae9cad
2022-05-25 19:05:16 +09:00
Nobuyoshi Nakada df7a1377e6 [ruby/timeout] Update spec files not to include unused files [ci skip]
https://github.com/ruby/timeout/commit/01c44b591f
2022-05-25 18:58:46 +09:00
Nobuyoshi Nakada e77e233935 [ruby/timeout] Hack to avoid leak checker
https://github.com/ruby/timeout/commit/9a9b03b44c
2022-05-25 18:47:26 +09:00
Hiroshi SHIBATA fde4519af8 [ruby/timeout] Bump version to 0.3.0
https://github.com/ruby/timeout/commit/f69f954a94
2022-05-25 18:08:01 +09:00
nicholas a. evans d020334e9e [ruby/reline] Workaround libncurses.so as a linker script
This maybe isn't probably isn't the best approach, but it will allow
`Fiddle::Terminfo.curses_dl` to work.  I documented more details about
this in an issue on fiddle: https://github.com/ruby/fiddle/issues/107

It is probably better to deal with it there.  But this is workaround is
simpler.

FYI: `reline` itself seems to be working just fine for me _without_
loading ncurses.  But I wanted to be able to use `Reline::Terminfo` for
my own projects. :)

https://github.com/ruby/reline/commit/fd4bdb35e2
2022-05-25 06:34:28 +09:00
David Rodríguez 9fdef28687 [rubygems/rubygems] Show exception cause in bug report template
https://github.com/rubygems/rubygems/commit/84b163e804
2022-05-25 01:17:59 +09:00
Burdette Lamar ae09fffbff [ruby/fileutils] [DOC] Enhanced RDoc for ::cp_r (https://github.com/ruby/fileutils/pull/75)
https://github.com/ruby/fileutils/commit/a4da433443
2022-05-25 00:38:14 +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
Burdette Lamar 9c9c217045 [ruby/fileutils] [DOC] Enhanced RDoc for ::cp (https://github.com/ruby/fileutils/pull/74)
https://github.com/ruby/fileutils/commit/956b345ceb
2022-05-24 07:57:52 +09:00
Burdette Lamar 08b2f22c27 [ruby/fileutils] Enhanced RDoc for ::ln_sf and ::link_entry (https://github.com/ruby/fileutils/pull/73)
https://github.com/ruby/fileutils/commit/ff49055f8a
2022-05-24 01:17:11 +09:00
Burdette Lamar 479884d596 [ruby/fileutils] [DOC] Enhanced RDoc for ::ln_s (https://github.com/ruby/fileutils/pull/72)
https://github.com/ruby/fileutils/commit/db612c5e22
2022-05-23 22:00:33 +09:00
Yusuke Endoh 663915ddf4 [rubygems/rubygems] Support the change of did_you_mean about Exception#detailed_message
I am asking did_you_mean to use Exception#detailed_message to add
"Did you mean?" suggestion instead of overriding #message method.

https://github.com/ruby/did_you_mean/pull/177

Unfortunately, the change will affect Gem::UnknownCommandError, which
excepts did_you_mean to override #message method.

This PR absorbs the change of did_you_mean.
Gem::CommandManager now calls #detailed_message method to get a message
string with "Did you mean?" suggestion from an exception.

https://github.com/rubygems/rubygems/commit/8f104228d3
2022-05-23 20:51:17 +09:00
Nobuyoshi Nakada 4cf155e007 [ruby/net-http] [DOC] Get rid of a RDoc bug
RDoc overrides class name by the assigned name unexpectedly when
assigned using a qualified class path.

https://github.com/ruby/net-http/commit/a7bded0407
2022-05-23 18:23:22 +09:00
Burdette Lamar aef36bb933 [ruby/fileutils] Enhanced RDoc for #cp_lr (https://github.com/ruby/fileutils/pull/71)
https://github.com/ruby/fileutils/commit/39772bccca
2022-05-21 08:55:57 +09:00
Nobuyoshi Nakada 8fa9e168be [ruby/net-http] Make the recommended name formal
`HTTPServerException` is the name deprecated since years ago.

https://github.com/ruby/net-http/commit/b3028fef5a
2022-05-21 00:41:54 +09:00
ima1zumi bcdbfe4b6e
[ruby/reline] Require Ruby >= 2.6
fix https://github.com/ruby/reline/pull/428

https://github.com/ruby/reline/commit/dae9eca323
2022-05-20 17:49:15 +09:00
Burdette Lamar 589f1c1d55
[ruby/tempfile] Enhanced RDoc for ::new and ::create (https://github.com/ruby/tempfile/pull/10)
https://github.com/ruby/tempfile/commit/a5e53aa82a
2022-05-20 17:49:14 +09:00
Olle Jonsson 6923dd932b
[ruby/tempfile] Drop unused gemspec directives
This gem exposes no executables.

https://github.com/ruby/tempfile/commit/07fde5fe14
2022-05-20 17:49:14 +09:00
Hiroshi SHIBATA aeea88174d
Merge RubyGems and Bundler HEAD
125415593e
2022-05-20 17:32:19 +09:00
Jean byroot Boussier bd8df25cdc
[ruby/did_you_mean] Fix `frozen_string_literal is ignored after any tokens` warning. (https://github.com/ruby/did_you_mean/pull/172)
```
did_you_mean/formatters/verbose_formatter.rb:5: warning: `frozen_string_literal' is ignored after any tokens
```

https://github.com/ruby/did_you_mean/commit/531760f323
2022-05-20 17:32:18 +09:00
Benoit Daloze 75fcfb1416 [ruby/timeout] Remove redundant done? check
* It's already checked inside #interrupt.

https://github.com/ruby/timeout/commit/5f43254f81
2022-05-19 07:19:42 +09:00
Benoit Daloze 240ac9eaa8 [ruby/timeout] Synchronize all accesses to @done
* So it is trivially correct.
* Performance seems the same overall.

https://github.com/ruby/timeout/commit/5e0d8e1637
2022-05-19 07:19:41 +09:00
Benoit Daloze 354cd6f210 [ruby/timeout] Handle Timeout + fork and add test for it
https://github.com/ruby/timeout/commit/4baee63b9b
2022-05-19 07:19:40 +09:00
Benoit Daloze 89fbec224d [ruby/timeout] Reimplement Timeout.timeout with a single thread and a Queue
https://github.com/ruby/timeout/commit/2bafc458f1
2022-05-19 07:19:39 +09:00
Kouhei Yanagita e658da9408 [ruby/irb] Fix documents for .irbrc path
https://github.com/ruby/irb/commit/af99c01b0d
2022-05-18 07:12:29 +09:00
Kazuhiro NISHIYAMA f2dc972940 [ruby/set] Fix a typo
https://github.com/ruby/set/commit/71a876ae81
2022-05-16 23:43:04 +09:00
David Rodríguez 641c3830df [rubygems/rubygems] Use `Array#concat` in `SpecSet#for` to save memory
On `rails/rails` repository Gemfile, running the following script

```
# script.rb
require "bundler/setup"
```

#### Before

```
➜  rails git:(main) ✗ BUNDLER_VERSION=2.4.0.dev ruby-memory-profiler --pretty --no-detailed --allocated-strings=0 --retained-strings=0 script.rb
Total allocated: 24.37 MB (207937 objects)
Total retained:  2.98 MB (34152 objects)
```

#### After

```
➜  rails git:(main) ✗ BUNDLER_VERSION=2.4.0.dev ruby-memory-profiler --pretty --no-detailed --allocated-strings=0 --retained-strings=0 script.rb
Total allocated: 22.27 MB (206856 objects)
Total retained:  2.98 MB (34152 objects)
```

https://github.com/rubygems/rubygems/commit/2ea2523afd

Co-authored-by: Josh Nichols <josh.nichols@gusto.com>
2022-05-16 17:24:14 +09:00
David Rodríguez c380aac19d [rubygems/rubygems] Improve `bundler/setup` performance again
On a different patch, it was noticed Ngam Pham that we are calling
`LazySpecification#hash` many times, and simply memoizing that led to a
very considerable performance improvement in his app.

I noticed though that we shouldn't be calling `LazySpecification#hash`
that many times, and I located the culprit at `SpecSet#for` where we
were deduplicating the partial aggregated result on every iteration. It
is enough to do it just once at the end.

This leads on a 12% speedup on Rails repository Gemfile vs the previous
8% I was getting from memoizing `LazySpecification#hash`. Also, after
this patch memoizing `LazySpecification#hash` has no effect in
performance anymore.

https://github.com/rubygems/rubygems/commit/68d00a9edd

Co-authored-by: Ngan Pham <ngan@users.noreply.github.com>
2022-05-16 17:24:14 +09:00
Nobuyoshi Nakada 774b9e27ae [ruby/racc] [DOC] Remove stale `Object::ParseError` documentation
https://github.com/ruby/racc/commit/4ecc13c9cb
2022-05-16 12:24:10 +09:00
Burdette Lamar 48002ff187 [ruby/fileutils] [DOC] Enhanced RDoc for #ln (https://github.com/ruby/fileutils/pull/69)
Enhanced RDoc for #ln

https://github.com/ruby/fileutils/commit/79fc67f03f

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-14 22:38:22 +09:00
Burdette Lamar 9639dc91d9 [ruby/logger] [DOC] Enhanced RDoc for Logger (https://github.com/ruby/logger/pull/77)
Enhanced RDoc for Logger

https://github.com/ruby/logger/commit/c601ed0370

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-14 05:02:18 +09:00
Burdette Lamar 55ba414405 [ruby/logger] Update lib/logger.rb
https://github.com/ruby/logger/commit/a5a2f2da4a

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13 22:52:59 +09:00
Burdette Lamar 1f1283b927 [ruby/logger] Update lib/logger.rb
https://github.com/ruby/logger/commit/e6f2c64fc6

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13 22:52:58 +09:00
Burdette Lamar 45a92cc4fe [ruby/logger] Update lib/logger.rb
https://github.com/ruby/logger/commit/3dc5a8d7a4

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13 22:52:57 +09:00
Burdette Lamar 00635f8d41 [ruby/logger] Update lib/logger.rb
https://github.com/ruby/logger/commit/98919e09e5

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-13 22:52:56 +09:00
Burdette Lamar 2427a11b35 [ruby/logger] Update lib/logger.rb
https://github.com/ruby/logger/commit/073a892ad9

Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2022-05-13 22:52:55 +09:00
Burdette Lamar b9311e646e [ruby/logger] Update lib/logger.rb
https://github.com/ruby/logger/commit/6d91281f7f

Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2022-05-13 22:52:55 +09:00
Burdette Lamar e36a794f1a [ruby/logger] Update lib/logger.rb
https://github.com/ruby/logger/commit/34c0ba8baa

Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2022-05-13 22:52:54 +09:00
BurdetteLamar 90d8b7219e [ruby/logger] Enhanced RDoc for Logger
https://github.com/ruby/logger/commit/16556d06d1
2022-05-13 22:52:53 +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 4962e5c417 [rubygems/rubygems] Normalize parameter name
The other sources use `options` which reads better.

https://github.com/rubygems/rubygems/commit/a672f9d602
2022-05-13 15:23:56 +09:00
Jun Aruga 019cbded90 mkmf: Add a configure option to set verbose mode (V=1 or 0) in mkmf.rb.
Note this change is only for `configure.ac`, not for Windows using
`win32/configure.bat`.

```
$ ./configure --help | grep mkmf
  --enable-mkmf-verbose   enable verbose in mkmf
```

Run the following command to enable the mkmf verbose mode.

```
$ ./configure --enable-mkmf-verbose
$ grep MKMF_VERBOSE config.status
S["MKMF_VERBOSE"]="1"
```

In this mkmf verbose mode, when compiling a native extension, the
`rake compile` prints the compiling commands such as
"gcc -I. <...> path/to/file" instead of "compiling path/to/file".

```
$ git clone https://github.com/deivid-rodriguez/byebug.git
$ cd byebug
$ bundle install --standalone
$ bundle exec rake compile
...
gcc -I. <...> path/to/file
...
```
2022-05-12 12:36:10 +02:00
Benoit Daloze 40ca208a6d [ruby/uri] Improve URI.register_scheme tests and automatically upcase the given scheme
* Also add docs and mention current limitations.
* For reference, https://stackoverflow.com/a/3641782/388803 mentions the
  valid characters in schemes.

https://github.com/ruby/uri/commit/4346daac75
2022-05-12 18:19:17 +09:00
Jeremy Evans fbebfe1697 [ruby/uri] Add URI::Generic#decoded_#{user,password}
URI::Generic#{user,password} return the encoded values, which are
not that useful if you want to do authentication with them.
Automatic decoding by default would break backwards compatibility.
Optional automatic decoding via a keyword to URI.parse would
require threading the option through at least 3 other methods, and
would make semantics confusing (user= takes encoded or unencoded
password?) or require more work.  Thus, adding this as a separate
method seemed the simplest approach.

Unfortunately, URI lacks a method for correct decoding.  Unlike in
www form components, + in earlier parts of the URI such as the
userinfo section is treated verbatim and not as an encoded space.
Add URI.#{en,de}code_uri_component methods, which are almost the
same as URI.#{en,de}code_www_form_component, but without the
special SP => + handling.

Implements [Feature #9045]

https://github.com/ruby/uri/commit/16cfc4e92f
2022-05-12 14:54:37 +09:00
Frank Schmitt 054ae999dc [ruby/uri] Update file.rb
The module here is called `URI`, so it's probably reasonable to expect a requirement for the path to be RFC3986-compliant, but on the other hand, the class is called `File`, so it might be reasonable to expect that a path produced by e.g. the `File` class would be consumable by its `build` method (this fails if the filename contains e.g. a space).

https://github.com/ruby/uri/commit/ef79789b83
2022-05-12 10:06:57 +09:00
Burdette Lamar 019169346a [ruby/fileutils] Update lib/fileutils.rb
https://github.com/ruby/fileutils/commit/4771925fee

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-05-12 04:11:51 +09:00
BurdetteLamar dbca60c58d [ruby/fileutils] Enhanced RDoc for FileUtils
https://github.com/ruby/fileutils/commit/a0ea474214
2022-05-12 04:11:50 +09:00
Peter Zhu 4da0f7a7f5 [ruby/rdoc] Fix dead link in RDoc::Markup
https://github.com/ruby/rdoc/commit/521c9ebd29
2022-05-12 02:54:14 +09:00
BurdetteLamar becafe1efb [ruby/fileutils] Enhanced RDoc for FileUtils
https://github.com/ruby/fileutils/commit/c38fd02372
2022-05-11 23:00:04 +09:00
BurdetteLamar dde9db64e0 [ruby/fileutils] Enhanced RDoc for FileUtils
https://github.com/ruby/fileutils/commit/7b60f2d63b
2022-05-11 23:00:03 +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