Commit graph

14659 commits

Author SHA1 Message Date
Ulysse Buonomo
5348a34504 [ruby/rdoc] Relative loading for easier development (https://github.com/ruby/rdoc/pull/821)
This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.

Discussion started at https://github.com/ruby/rdoc/pull/817.

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>

aa41bd48eb

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-02-12 15:06:06 +09:00
Yusuke Endoh
08137c5dd9 [ruby/rdoc] Optimize RawLine by using a regexp instead of negative look-ahead rule
This improves the performance in some cases.
`rdoc .../gems/sinatra-2.1.0/README.md` takes 10.5 sec. before this
change, and 7.1 sec. after this change.
`make rdoc` of ruby/ruby takes 19.3 sec. before this change, 18.1 sec.
after this change.

7cf8281e3e
2022-02-12 14:59:26 +09:00
Ilia Zenkevich
e92e87bf90 [rubygems/rubygems] Add clarification for bundle-config "with" option
666f3cc724
2022-02-11 18:49:57 +09:00
David Rodríguez
7b676b3ce3 [rubygems/rubygems] Fix corrupted lockfile when using gemspec and multiple sources
9712262d90
2022-02-11 18:20:20 +09:00
Hiroshi SHIBATA
f07a2613e3
Support directory layout of ruby/ruby repository 2022-02-10 17:18:05 +09:00
Hiroshi SHIBATA
52d3e31d27
[ruby/ipaddr] Bump version to 1.2.4
6edf6ee6c3
2022-02-10 17:18:05 +09:00
Espartaco Palma
9b768012f6
[ruby/ipaddr] Fix exception calling to_range' after freeze'
77fe1fca0a
2022-02-10 17:18:05 +09:00
Jean Boussier
100253c7f0
[ruby/ipaddr] Ipaddr#native must also coerce @mask_addr
Before it would be left as an IPv6 mask causing `to_range` to fail.

```
>> IPAddr.new("::2").native.to_range
/opt/rubies/3.0.3/lib/ruby/3.0.0/ipaddr.rb:479:in `set': invalid address (IPAddr::InvalidAddressError)
```

af485192f3
2022-02-10 17:18:05 +09:00
Jean Boussier
5221cb4468
[ruby/ipaddr] Expose IPAddr::VERSION
An almost universal convention for gems is to expose Namespace::VERSION
which makes it much easier when debugging etc.

587ae6996e
2022-02-10 17:18:03 +09:00
Sven Schwyn
a271acf822 [rubygems/rubygems] Fix typo in multiple gemfiles warning
bc69d19097
2022-02-10 08:38:09 +09:00
Nobuyoshi Nakada
8013250136 [ruby/rdoc] Simplify attribute exclusiveness conditions
45e33c4b85
2022-02-09 22:22:46 +09:00
Nobuyoshi Nakada
ec6d1cf28f [ruby/rdoc] Get rid of ruby-mode.el confusions
63fac51198
2022-02-09 22:22:45 +09:00
Nobuyoshi Nakada
994b3f1dc6 [ruby/rdoc] Allow cross references to negation operator method
69cafb213a
2022-02-09 19:41:12 +09:00
Nobuyoshi Nakada
8db06fe2c9 [ruby/rdoc] Allow cross references to logical operator methods
17c0da304d
2022-02-09 19:41:11 +09:00
Soutaro Matsumoto
cbd54cba03 [ruby/rdoc] Skip parentheses on singleton class declaration
b6c6d4f978
2022-02-09 18:45:05 +09:00
Nobuyoshi Nakada
88b1d21dbb [ruby/rdoc] Allow cross references to backtick method
52c33157f1
2022-02-09 18:44:41 +09:00
Nobuyoshi Nakada
202f690a5e [ruby/rdoc] Allow cross references to operator methods
Make operator methods, e.g., `Regexp#=~`, `Integer#<=>`, cross
reference targets.

5d332a4128
2022-02-09 18:44:40 +09:00
Nobuyoshi Nakada
dec96dd897 [ruby/rdoc] Support all struct definition functions
Currently only `rb_struct_define_without_accessor` is supported by
https://github.com/ruby/rdoc/pull/73.  We should support other
three functions too.

d42288f06c
2022-02-09 18:43:07 +09:00
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

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.

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

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.

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

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
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.

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.

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
...

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.

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
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

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
68bef90339
2022-01-25 01:11:39 +09:00
gemmaro
d77f2ff5b4 [ruby/rdoc] Fix typo in RDoc::Task example
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`.

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.

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.

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`

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

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`

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
89dd5158a4
2022-01-19 15:56:36 +09:00
David Rodríguez
1d530ae27a [rubygems/rubygems] Remove dead method
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.

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.

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
91f07a0208
2022-01-19 11:20:36 +09:00
David Rodríguez
f04954d95c
[rubygems/rubygems] Normalize end alignment style with Bundler
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