9991 Commits

Author SHA1 Message Date
nicholas a. evans
981a75db91 [rubygems/rubygems] Fix missing rdoc for Gem::Version
The rdoc for Gem::Version is available here:
* https://docs.ruby-lang.org/en/3.0/Gem/Version.html

However it is currently missing from:
* https://ruby-doc.org/stdlib-3.1.0/libdoc/rubygems/rdoc/Gem/Version.html
* https://docs.ruby-lang.org/en/3.1/Gem/Version.html
* https://docs.ruby-lang.org/en/master/Gem/Version.html
* `ri Gem::Version`
  with `ri --version` => 6.4.0 and `gem --version` => 3.3.5
* `yard ri Gem::Version` with `yard --version` => 0.9.27

https://github.com/rubygems/rubygems/commit/c10e5dd884
2022-02-07 23:06:19 +09:00
Jeremy Evans
7529c53891 [ruby/net-http] Do not set SNI hostname if connecting to IP address
RFC 6066, section 3, explicitly disallows the use of an IP address
as an SNI server name.  So check if the connection is being made
to an IP address using the resolv regexps, and do not set an SNI
hostname in that case.

Recent changes to LibreSSL make it more strictly follow RFC 6066,
resulting an s.hostname= raising an error if passed an IP address.
When such verions of LibreSSL are used, this change not only fixes
the net/http tests, it also fixes tests for webrick and open-uri,
which both make SSL connections to 127.0.0.1 using net/http in
their tests.

Avoid warning in the openssl extension by unsetting
@ssl_context.verify_hostname if connecting to an IP address.
Make changes so that the post_connection_check still happens
when connecting to an IP address, which is necessary to keep
checking that the certificate returned includes the IP address,
which one of the tests depends on.

Revert the previous change that modified the regexp used for
checking the error message.

https://github.com/ruby/net-http/commit/fa68e64bee
2022-02-03 05:10:21 +09:00
Olle Jonsson
d8c54bac4a [ruby/net-protocol] Fix typo in gem description [ci skip]
https://github.com/ruby/net-protocol/commit/35d7b08a54
2022-02-02 21:21:47 +09:00
Olle Jonsson
94687a6826 [ruby/net-protocol] Drop unused gemspec directives
This gem exposes no executables.

https://github.com/ruby/net-protocol/commit/3c4def2a64
2022-02-02 21:17:47 +09:00
Dan Jensen
0b2f6b942b [rubygems/rubygems] Skip "seller shipped" notification after delivery
If a Shipment has been delivered, there is no point in notifying the
buyer that the seller shipped. Instead, we should simply notify the
buyer that the shipment was delivered. This is relevant in cases where
the seller is late to mark a Shipment as shipped, so the first EasyPost
Tracker update marks it as delivered, or in cases where the seller
fails to mark as shipped and the buyer marks it as delivered.

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

https://github.com/rubygems/rubygems/commit/09c2cadc86
2022-02-01 20:07:18 +09:00
David Rodríguez
517d7c3221 Sync latest Bundler & RubyGems 2022-02-01 08:09:23 +09:00
Josef Šimánek
d5c9710b07 [rubygems/rubygems] Remove encoding pragma from specification.rb
- it is not used since it is not at the top of the file
- it is not useful anymore

https://github.com/rubygems/rubygems/commit/6aee05d923
2022-02-01 05:20:38 +09:00
Nobuyoshi Nakada
7672f6a423
mkmf: unify duplicate code in pkg_config 2022-01-29 15:29:46 +09:00
Mike Dalessio
b90e56e624 mkmf: pkg_config accepts multiple options 2022-01-29 15:22:52 +09:00
aycabta
d66e7ec77b [ruby/reline] Add a comment for VK_MENU
https://github.com/ruby/reline/commit/ee307c2b01
2022-01-27 20:54:09 +09:00
aycabta
f4ee60543a [ruby/reline] The AltGr behaves exactly the same as Ctrl+Alt
On European keyboards.

https://github.com/ruby/reline/commit/75fe9759a4
2022-01-27 20:54:09 +09:00
Charles Oliver Nutter
f511ff3b3a [ruby/yaml] Add JRuby-specific warning when psych fails
The error here is confusing for users because JRuby does not use
libyaml and installing it will not help. Instead, JRuby directs
them to a wiki page that describes an issue when multiple
conflicting versions of SnakeYAML are installed.

This change allows us to use the yaml gem and delete our local
sources.

https://github.com/ruby/yaml/commit/8122087ffb
2022-01-27 17:16:05 +09:00
Jesse Chavez
99d02caed3 [ruby/logger] Fix log rotation inter-process lock failed.
Issue only occurs in JRuby 9.3.0.0 and Windows and the full
console output is:

log rotation inter-process lock failed. D:\log.txt -> D:\log.txt.0: The process cannot access the file because it is being used by another process.
log writing failed. closed stream
log writing failed. closed stream
...

https://github.com/ruby/logger/commit/19fc734638
2022-01-27 12:33:06 +09:00
manga_osyo
b6b2e489f1 [ruby/irb] Changed to call Kernel.print
If you call `binding.irb` on a class defined `#print`, it will crash, so call `Kernel.print`.

Fix [Bug #18389] `binding.irb` can fail in some classes that implement `context` and `print` methods.

https://github.com/ruby/irb/commit/d54b271984
2022-01-27 01:28:52 +09:00
David Rodríguez
c925d3b668 [rubygems/rubygems] Fix force_ruby_platform ignored when lockfile includes the current specific platform
https://github.com/rubygems/rubygems/commit/9ca371adf8
2022-01-26 13:09:31 +09:00
Ngan Pham
42ef3fcaef [rubygems/rubygems] Use Gem::Platform.local instead of RUBY_PLATFORM
In certain places, we want to display the platform name with
`Gem::Platform.local` instead of `RUBY_PLATFORM`.

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

https://github.com/rubygems/rubygems/commit/bdd1848ae8
2022-01-26 02:24:30 +09:00
David Rodríguez
4317a6750d [rubygems/rubygems] Forbid downgrading past the originally shipped version on Ruby 3.1
https://github.com/rubygems/rubygems/commit/68bef90339
2022-01-25 01:11:39 +09:00
gemmaro
d77f2ff5b4 [ruby/rdoc] Fix typo in RDoc::Task example
https://github.com/ruby/rdoc/commit/7a77e55c2a
2022-01-24 10:17:16 +09:00
Postmodern
c155445752 [ruby/reline] Ignore global constants when checking if Fiddle::VERSION exists
If a top-level `VERSION` constant exists, or if a module containing a `VERSION` constant is included into the top-level scope, then `Fiddle.const_defined?(:VERSION)` will erroneously return true when `RUBY_VERSION < 3.0.0`.

https://github.com/ruby/reline/commit/8529c8e47a
2022-01-24 07:00:34 +09:00
David Rodríguez
2b7025e680 [rubygems/rubygems] Rename Gem.open_with_flock to Gem.open_file
Since it only uses `flock` on Windows.

https://github.com/rubygems/rubygems/commit/b877de4d9c
2022-01-20 06:45:28 +09:00
David Rodríguez
ec5bde1a80 [rubygems/rubygems] Restrict flock to Windows
It was introduced to fix some race conditions there, but it doesn't seem
necessary on other systems and it's actually causing issues there.

https://github.com/rubygems/rubygems/commit/27b682c812
2022-01-20 06:45:27 +09:00
Yusuke Nakamura
7353f950c3 [rubygems/rubygems] Change generated namespaced test class name in minitest
* `foo` => `TestFoo`
* `foo_bar` => `TestFooBar`
* `foo-bar` => `Foo::TestBar`

https://github.com/rubygems/rubygems/commit/353cdd61c3
2022-01-20 01:04:53 +09:00
Yusuke Nakamura
4451313252 [rubygems/rubygems] Update generated minitest file style
foo     => test/test_foo.rb
foo-bar => test/foo/test_bar.rb
foo_bar => test/test_foo_bar.rb

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

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

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

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

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

https://github.com/rubygems/rubygems/commit/5d9a69fc0f
2022-01-20 01:04:52 +09:00
David Rodríguez
0dd8c6157d [rubygems/rubygems] Don't pass regexp to Gem::Dependency.new during gem dependency
https://github.com/rubygems/rubygems/commit/89dd5158a4
2022-01-19 15:56:36 +09:00
David Rodríguez
1d530ae27a [rubygems/rubygems] Remove dead method
https://github.com/rubygems/rubygems/commit/477d5f6f6e
2022-01-19 15:56:36 +09:00
David Rodríguez
0350c179ea [rubygems/rubygems] Don't pass regexp to Gem::Dependeny.new from list, search, and query commands
It's deprecated functionality.

https://github.com/rubygems/rubygems/commit/13d3eb6cb0
2022-01-19 15:56:35 +09:00
David Rodríguez
8b6a02de2f [rubygems/rubygems] Simplify argument processing logic in gem list & gem search
Make it more explicit that if not specific arguments are given, the
value of `-n` is used.

https://github.com/rubygems/rubygems/commit/ed811ddc00
2022-01-19 15:56:35 +09:00
Hiroshi SHIBATA
d22511fd75 Merge rubygems/rubygems HEAD.
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
2022-01-19 15:01:44 +09:00
David Rodríguez
e7249294fb
[rubygems/rubygems] Fix regression with old marshaled specs having null required_rubygems_version
https://github.com/rubygems/rubygems/commit/91f07a0208
2022-01-19 11:20:36 +09:00
David Rodríguez
f04954d95c
[rubygems/rubygems] Normalize end alignment style with Bundler
https://github.com/rubygems/rubygems/commit/f7f504b24c
2022-01-19 11:20:36 +09:00
Takashi Kokubun
c0d18a1aa2
[ruby/erb] Revert "Remove safe_level and further positional arguments (https://github.com/ruby/erb/pull/7)"
This reverts commit 5133efa06f.

While we already handled this deprecation in many libraries, we noticed
that some (e.g. sprockets) relied on the format of `ERB.version` and
2b4182eb10 broke such handling.

Given that the `ERB.version` change was released at 3.1 and it's
obviously new, I'll skip this removal in 3.2 and postpone this to a
future version.
2022-01-17 12:39:17 -08:00
st0012
e53962b9e1 [ruby/irb] Use require_relative to load extensions/commands
https://github.com/ruby/irb/commit/d5060f7668
2022-01-17 21:09:36 +09:00
Yusuke Endoh
b4e362d444 lib/drb/drb.rb: Prevent a "warning: assigned but unused variable"
... by replacing the variable with a underscore-prefixed name
2022-01-17 14:56:11 +09:00
st0012
81b604fb00 [ruby/irb] Use require_relative to require lib files
1. `require` can mislead Ruby to load system irb's files and cause
   constant redefined warnings as other code loads the same module/class
   from lib folder.
2. Most files already use `require_relative`.

https://github.com/ruby/irb/commit/848d339f2e
2022-01-17 14:23:40 +09:00
Brandon Weaver
ac1bb6b510 [ruby/net-http] Rename D to debug in Net::HTTP
Renames `D` to `debug` in `Net::HTTP` and introduces an alias for
backwards compatibility. This was done for readability reasons, in that
`D` did not clearly reflect what the method was doing and can cause some
confusion.

https://github.com/ruby/net-http/commit/582d6e87d6
2022-01-17 10:17:23 +09:00
aycabta
f5e3913737 [ruby/reline] Fix incremental search to work correctly even if not last line
https://github.com/ruby/reline/commit/21d75f6d4c
2022-01-16 22:09:31 +09:00
aycabta
921ff739df [ruby/reline] Insert newline in the middle of buffer just after dialog
https://github.com/ruby/reline/commit/0c76631132
2022-01-16 22:09:31 +09:00
aycabta
2bc6b07a8d [ruby/reline] Combine common logic into one
https://github.com/ruby/reline/commit/5db9738f17
2022-01-16 22:09:29 +09:00
aycabta
f94a2adf6a [ruby/reline] Clear dialog when adding new line to end of buffer
https://github.com/ruby/reline/commit/7d38454327
2022-01-16 22:09:28 +09:00
Takashi Kokubun
d12a08abb5 [ruby/erb] Remove safe_level and further positional arguments (https://github.com/ruby/erb/pull/7)
[Feature #14256]

https://github.com/ruby/erb/commit/5133efa06f
2022-01-16 06:46:47 +09:00
Takashi Kokubun
3cfb6fc479 [ruby/erb] Escape the second *
The original code just seems unintentional

https://github.com/ruby/erb/commit/75a0749cb7
2022-01-16 05:26:37 +09:00
ooooooo_q
b2d15dcad6 [ruby/erb] fix regexp (https://github.com/ruby/erb/pull/6)
https://github.com/ruby/erb/commit/33100a022f
2022-01-16 05:21:05 +09:00
loadkpi
7c70151aed [rubygems/rubygems] Fix gem update --system for already installed version of rubygems-update
https://github.com/rubygems/rubygems/commit/c167d513a7
2022-01-15 14:00:35 +09:00
Masatoshi SEKI
64e19ad7e9 to prevent collection, keep the last result. 2022-01-15 00:58:21 +09:00
David Rodríguez
7d42b442bb [rubygems/rubygems] Support binstubs with --enable-load-relative prolog
https://github.com/rubygems/rubygems/commit/32a5e9057a
2022-01-15 00:00:11 +09:00
David Rodríguez
044b0ae8e0 [rubygems/rubygems] Extract a bit of common logic to methods
https://github.com/rubygems/rubygems/commit/9a1b891435
2022-01-15 00:00:10 +09:00
David Rodríguez
810516ca31 [rubygems/rubygems] Fix method documentation to be more correct English
https://github.com/rubygems/rubygems/commit/bcffd92c48
2022-01-15 00:00:09 +09:00
Koichi Sasada
53a4e10146 clear @result after setup_message
For the remote object `ro`, method chain like `ro.foo.bar` the
result of `ro.foo` is stored in `@result`, but cleared just
before `setup_message` and it seems GCed on specific machine.

```
  1) Error:
DRbTests::TestDRbCore#test_05_eq:
RangeError: "140" is recycled object
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:366:in `_id2ref'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:366:in `to_obj'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1528:in `to_obj'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1847:in `to_obj'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:620:in `recv_request'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:931:in `recv_request'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1656:in `init_with_client'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1668:in `setup_message'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1632:in `perform'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1725:in `block (2 levels) in main_loop'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1721:in `loop'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1721:in `block in main_loop'
    /tmp/ruby/v3/src/trunk-repeat20-asserts/test/drb/drbtest.rb:206:in `test_05_eq'
```

To prevent collecting, clear `@result` just after `setup_message`
and `setup_message` can get the last result object.
2022-01-14 18:33:16 +09:00
Justin Searls
a485152660 [rubygems/rubygems] Lock standard.yml to the required ruby version
https://github.com/rubygems/rubygems/commit/1791b5b9e5
2022-01-13 23:59:55 +09:00