Commit graph

14675 commits

Author SHA1 Message Date
David Rodríguez
e88039ee4c [rubygems/rubygems] Add missing --all-platforms flag to bundle binstubs --help
440b7b8282
2024-12-11 17:56:23 +00:00
David Rodríguez
447189d7de [rubygems/rubygems] Add missing --glob flag to bundle add --help
1e4dc0a703
2024-12-11 17:56:22 +00:00
David Rodríguez
bbd11a7975 [rubygems/rubygems] Add missing --target-rbconfig flag to bundle install --help
54dbcdc656
2024-12-11 17:56:22 +00:00
David Rodríguez
ac959b177a [rubygems/rubygems] Clarify --target-rbconfig option banner
6625998ca6
2024-12-11 17:56:21 +00:00
David Rodríguez
99460d1eda [rubygems/rubygems] Add missing banners to bundle exec CLI flags
c6f62b2eed
2024-12-11 17:56:21 +00:00
David Rodríguez
06f074eb5c [rubygems/rubygems] Style CLI options consistently
In one liners, no whitespace for alignment.

413339a9ca
2024-12-11 17:56:20 +00:00
David Rodríguez
b37ab8c123 [rubygems/rubygems] Add missing man pages for bundle env and bundle licenses commands
6e1a515d58
2024-12-11 16:18:12 +00:00
David Rodríguez
d91ca85b97 [rubygems/rubygems] Bring man pages up to date
8288cfd3e0
2024-12-11 16:18:11 +00:00
David Rodríguez
e31f6a8f8b [rubygems/rubygems] Align all header lines with titles for consistency
83fd1c6718
2024-12-11 16:18:10 +00:00
Stan Lo
2335ecb7fa [ruby/irb] Page the output in irb:rdbg sessions too
(https://github.com/ruby/irb/pull/1043)

IRB started to page its evaluation output and it became a useful feature
for users. However, in `irb:rdbg` sessions, the output is not paged so
the sudden change in behavior is surprising and inconvenient.

This commit makes `irb:rdbg` sessions page the output of the debugger
too.

8241ec9a0c
2024-12-11 11:30:36 +00:00
tomoya ishida
3568e7aef7 [ruby/reline] Fix line wrapped cursor position
(https://github.com/ruby/reline/pull/791)

Cursor position calculation was wrong when the input line contains "\1" or CSI escape sequence.

a1943daaf4
2024-12-10 10:28:22 +00:00
David Rodríguez
ebb80c26b3 [ruby/resolv] Securerandom should be always available
324c355eb7
2024-12-10 10:08:49 +00:00
Stan Lo
93f8de777f [ruby/rdoc] Expand rdoc-ref targets at the end of ri output
(https://github.com/ruby/rdoc/pull/1141)

There have been several document refactors in ruby/ruby that extract
individual methods/classes' documentation into separate files, like
ruby/ruby#6567

Because RI is not capable of rendering those references, RI users
are left with dramatically fewer documentation on those methods/classes.

This commit adds a new option `--expand-ref` (default: true) to expand
all the rdoc-ref targets at the end of the output.

9e2b28c6e3
2024-12-09 17:21:01 +00:00
OKURA Masafumi
895f2c2152 [ruby/rdoc] lint: Remove unreachable code
(https://github.com/ruby/rdoc/pull/1137)

This is an attempt to utilize RuboCop further.
RuboCop was added in 9262fdd43a
but only a few rules have been enabled.
I believe we can utilize RuboCop more for better code quality,
especially with Lint cops.
This is the first step to enable other Lint cops.
This commit also exclude some auto generated files.

a53287fce0
2024-12-08 23:14:18 +00:00
nicholas a. evans
dd43af3be7 [ruby/rdoc] Use distinct styles for note lists and label lists
(https://github.com/ruby/rdoc/pull/1209)

* Use the original `label` description list style

As a default for all description lists, the original "label" style is
more readable.

This is slightly different from the original `label` dl though:
* slightly increased left margin for `dd` (to 1em)
* removed right margin on `dd`
* removed `dt` bottom margin and `dd` top margin, to reduce the gap
  between the term and its description (to only the standard line-height
  gap).

* Add closing tags for description list terms

Without the closing tags, the dt elements contain whitespace after the
text.  This normally isn't a big deal, but does mess some things up,
e.g: using `::after` with `content: ", "` in stylesheets.

* Restore float:left style for note lists

Unlike the original note list styles, this version sets the line-height
for all `dt` elements to be the same as the `p` elements contained
inside the `dd`, so that the second line has the same indentation as all
subsequent lines.

* Add commas between note list terms

9e69ea6d75
2024-12-08 10:43:47 +00:00
David Rodríguez
48443c0204 [rubygems/rubygems] Skip unresolved deps warning on Gem::Specification.reset on benign cases
If `Gem::Specification.reset` is used, but there are still unresolved
dependencies, RubyGems prints a warning. There are though, certain cases
where the situation will not cause any issues.

One such case is when the unresolved dependency does not restrict any
versions (>= 0) and there's a default gem matching it.

In this situation, it doesn't matter if Gem paths change, because
default gems are still activatable, so the dependency will be properly
activated if ever needed.

e5f8a3068e
2024-12-06 15:19:19 +00:00
tomoya ishida
5f65321915 [ruby/reline] Combine MAPPINGS(single byte input to symbol) with
key_bindings(escape sequence to symbol)
(https://github.com/ruby/reline/pull/715)

6a7e249374
2024-12-06 07:09:24 +00:00
Samuel Giddins
305318edbb [rubygems/rubygems] Apply suggestions from code review
7c634ecd72
2024-12-05 19:00:44 +00:00
Samuel Giddins
7daf85bdf2 [rubygems/rubygems] Stop storing executable names in ivars
Removes usage of these classes as ACE gadgets

See https://nastystereo.com/security/ruby-3.4-deserialization.html

Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

89ad04db86
2024-12-05 19:00:44 +00:00
Stan Lo
2ecd2fe0ed [ruby/rdoc] Deprecate main and title directives
(https://github.com/ruby/rdoc/pull/1218)

* Deprecate :main: directive

* Deprecate :title: direcive

* Update documentation

* Remove :main: directive's usage

* Update test cases

* Add '.rdoc_options' to suggested alternatives

e2d4ac9dad
2024-12-05 11:36:34 +00:00
Yuki Nishijima
834d68238c [ruby/did_you_mean] Bump version to 2.0.0
1cce337962
2024-12-04 12:32:02 +00:00
Hiroshi SHIBATA
ef5dfcef3d [ruby/did_you_mean] Removed deprecated constants for Ruby 3.4
e11bf81438
2024-12-04 12:07:11 +00:00
sodacris
e18fb1281a [rubygems/rubygems] add relative path support for bundle exec
c982085f86
2024-12-04 08:34:57 +00:00
Nobuyoshi Nakada
3b27818062 [ruby/shellwords] NUL char cannot be in shell words
2c7ae1b76c
2024-12-04 07:48:59 +00:00
Nobuyoshi Nakada
edd3977b40 [ruby/logger] Enable log file rotation on Windows
Since ruby 2.3, a file opened with `File::SHARE_DELETE` and
`File::BINARY` can be renamed or removed.

7b6146fee6
2024-12-04 07:45:39 +00:00
Nobuyoshi Nakada
ed47b6b324 [ruby/logger] Extract Logger::LogDevice#handle_write_errors
f904ad2f7c
2024-12-04 07:45:37 +00:00
tomoya ishida
e539342f65 [ruby/irb] Don't show 'Maybe IRB bug!' in show_source and ls command
(https://github.com/ruby/irb/pull/1039)

9eb14a3a0b
2024-12-03 21:55:33 +00:00
Cosmic Oppai
f6b62d001a [ruby/timeout] removed the non numeric check
7d2af46a00

Co-authored-by: Jeremy Evans <code@jeremyevans.net>
2024-12-03 06:49:57 +00:00
Cosmic Oppai
7dc7aab4e9 [ruby/timeout] updated doc string
4be6423de4

Co-authored-by: Jeremy Evans <code@jeremyevans.net>
2024-12-03 06:49:56 +00:00
CosmicOppai
b156efc2a6 [ruby/timeout] updated doc and kept the nil compatiability
f992632cf3
2024-12-03 06:49:55 +00:00
CosmicOppai
e7dd185e21 [ruby/timeout] refactor the change to raise for nil and type-errror and added tests
ffc8d7c003
2024-12-03 06:49:55 +00:00
CosmicOppai
0f2cd39e68 [ruby/timeout] refactor the change to keep the compatability with nil and type-errror and added tests
8342544979
2024-12-03 06:49:54 +00:00
CosmicOppai
203a023447 [ruby/timeout] added the check for negative sec
8e57887eee
2024-12-03 06:49:53 +00:00
Hiroshi SHIBATA
e34163d7fe [ruby/pp] Bump up 0.6.2
979f9d972d
2024-12-03 04:52:19 +00:00
Yusuke Endoh
043f26edee [ruby/error_highlight] Bump version
a8e9eb7f2f
2024-12-03 03:11:18 +00:00
Hiroshi SHIBATA
d85e8b5339 Reapply "[ruby/rdoc] fix: C variables should never show up in Ancestors tree"
This reverts commit 0fe82ae087.
2024-12-03 10:59:32 +09:00
Mike Dalessio
af5c34fb0b [ruby/rdoc] Prefer String#ord to #codepoints[0]
(https://github.com/ruby/rdoc/pull/1220)

09d7f35420

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-12-02 22:08:03 +00:00
Mike Dalessio
4cce246d86 [ruby/rdoc] ClassModule#superclass= accepts a ClassModule as an
argument
(https://github.com/ruby/rdoc/pull/1222)

It is necessary for ClassModule's instance variable @superclass to
always be a String (or nil) so that the class can be saved with
`#marshal_dump` and loaded with `#marshal_load`.

However, there's no type checking being done, which allows a bug like
the one reported in #1221 (which was introduced in #1217) that sets
superclass to a ClassModule. That bug requires:

- setting a superclass to a NormalClass
- marshal_save
- marshal_load (which raises an exception)

With this change, passing a ClassModule to ClassModule#superclass= is
explicitly allowed by saving the full name of the ClassModule in the
@superclass instance variable.

9ced6d534c
2024-12-02 22:07:31 +00:00
tomoya ishida
36aeb12aa9 [ruby/reline] Implement buffered output to Reline::ANSI
(https://github.com/ruby/reline/pull/790)

Minimize the call of STDOUT.write
This will improve rendering performance especially when there is a busy thread `Thread.new{loop{}}`

a6fe45f5ba
2024-12-02 16:44:49 +00:00
Nobuyoshi Nakada
44ef172dbd [rubygems/rubygems] [DOC] Fix missing single quote
722d4c6926
2024-12-02 16:06:44 +00:00
Hiroshi SHIBATA
2b895a7ad5 [ruby/net-http] Bump up 0.6.0
6475fa68ba
2024-12-02 08:42:13 +00:00
Hiroshi SHIBATA
157fe74795 [ruby/logger] Bump up 1.6.2
2d07f086f8
2024-12-02 08:03:46 +00:00
Hiroshi SHIBATA
ff52431ee5 [ruby/securerandom] Bump up 0.4.0
53f97f3151
2024-12-02 07:45:05 +00:00
Hiroshi SHIBATA
983ae63f59 [ruby/securerandom] Random::Formatter is only provided from Ruby 3.1
90c7e390f5
2024-12-02 15:32:05 +09:00
Hiroshi SHIBATA
0fe82ae087
Revert "[ruby/rdoc] fix: C variables should never show up in Ancestors tree"
This reverts commit 2923f42ed7.

3375565361 (step):23:1031

```
/home/runner/work/actions/actions/snapshot-master/lib/rdoc/code_object.rb:322:in 'RDoc::CodeObject#parent': undefined method 'find_class_or_module' for nil (NoMethodError)
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/code_object/class_module.rb:342:in 'RDoc::ClassModule#marshal_dump'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:878:in 'Marshal.dump'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:878:in 'block in RDoc::Store#save_class'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:877:in 'IO.open'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:877:in 'RDoc::Store#save_class'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:763:in 'block in RDoc::Store#save'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:762:in 'Array#each'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:762:in 'RDoc::Store#save'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/generator/ri.rb:27:in 'RDoc::Generator::RI#generate'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:528:in 'block in RDoc::RDoc#generate'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:522:in 'Dir.chdir'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:522:in 'RDoc::RDoc#generate'
	from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:501:in 'RDoc::RDoc#document'
	from ./tool/rdoc-srcdir:27:in '<main>'
```
2024-12-02 09:39:56 +09:00
Kouhei Yanagita
ae59b44041 [ruby/set] Fix ^ to respect subclasses
f88ecdef6b
2024-12-02 08:28:58 +09:00
Kouhei Yanagita
f2334cf4b1 [ruby/set] Speed up Set#flatten
Improved performance by ensuring that identical `Set` objects are
processed only once.

cadb686e93
2024-12-02 08:28:44 +09:00
tomoya ishida
0fc70022e6 [ruby/reline] Call user defined sigwinch and sigcont handler
(https://github.com/ruby/reline/pull/788)

7d44770c84
2024-11-30 17:21:20 +00:00
Mari Imaizumi
569f27b425 [ruby/irb] Prevent cursor flickering
(https://github.com/ruby/irb/pull/1041)

0506ed0e11
2024-11-30 16:22:05 +00:00
Mike Dalessio
83bd9191d8 [ruby/rdoc] Methods are sorted symbols-first
(https://github.com/ruby/rdoc/pull/1219)

There are three distinct ranges of symbols in ASCII:

- the range below "A", 0..64 in decimal
- the range between "Z" and "a", 91..96 in decimal
- the range above "z", 123..127 in decimal

With this change, any method starting with a character in these
"symbol ranges" will be sorted before a method starting with an alpha
ASCII character. The remaining methods, all starting with alpha or
8-bit characters, will be sorted against each other exactly as before.

Specifically this addresses the issue from #1204 which is that `#[]`
and `#^` were previously sorted _after_ the alpha methods. These
methods will now be sorted before alpha methods.

Fixes https://github.com/ruby/rdoc/pull/1204

a4f13d242b
2024-11-30 16:06:54 +00:00