Commit graph

12164 commits

Author SHA1 Message Date
David Rodríguez
c1fb25f6fc
[rubygems/rubygems] Don't run any git commands when sorting and comparing git sources
Previously, when sorting and comparing git Gemfile vs lockfile sources during
`bundler/setup` to figure out whether we need to re-resolve or not, we
would try to find the default branch if nothing more specific was
specified in the Gemfile.

If the git cache has been deleted thought, that would fail.

The error would still be swallowed (and the branch would simply not be
displayed), but trying to clone would still generate the side effect of
creating the parent folder for the clone.

That could affect non-writable systems that don't expect `bundler/setup`
to write to the filesystem at all.

To fix this, override `Bundler::Source::Git#identifier` to use
exclusively static information, so it does not even try to clone the
repo nor generate any side effects.

582eb2ef39
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
d3305cab44
[rubygems/rubygems] restart with BUNDLE_VERSION if it's specified
57cfe7cf8d
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
f16c880f77
[rubygems/rubygems] Introduce bundle config set version feature
c431a1df52
2023-07-13 11:36:03 +09:00
Stan Lo
7f9c2a9bdd [ruby/irb] Bump version to 1.7.3
(https://github.com/ruby/irb/pull/639)

621c8c2b7d
2023-07-13 02:16:04 +00:00
Stan Lo
81beb29988 [ruby/irb] Correct preferred_dialog_height's caller
(https://github.com/ruby/irb/pull/638)

The caller should be the dialog itself, not Reline.

418c2b945e
2023-07-12 19:55:19 +00:00
Jemma Issroff
a02f5eb56a
YARP resync (#8059) 2023-07-12 12:46:38 -04:00
Koichi ITO
4fbfc116ca [rubygems/rubygems] Update GitHub organization of Standard Ruby
## What was the end-user or developer problem that led to this PR?

The old URL https://github.com/testdouble/standard is mentioned.

## What is your fix for the problem, implemented in this PR?

This PR updates to the new URL https://github.com/standardrb/standard.

eeafba72fc
2023-07-12 12:29:29 +00:00
ima1zumi
d40935c680 [ruby/irb] Bump version to 1.7.2
(https://github.com/ruby/irb/pull/636)

85d6b4d146
2023-07-11 16:30:34 +00:00
ima1zumi
4be92463b6 [ruby/irb] Require Reline 0.3.6 or higher
(https://github.com/ruby/irb/pull/632)

* Require Reline 0.3.6 or higher

"Multi-line multibyte regular expression raises exception" (https://github.com/ruby/irb/issues/627) is fixed in Reline 0.3.6.

* Remove unnecessary conditional
2023-07-11 14:47:26 +00:00
Nobuyoshi Nakada
880b29b74b [rubygems/rubygems] Use File::NULL instead of hard coded null device names
44fe8e7f50
2023-07-10 12:11:12 +00:00
Nobuyoshi Nakada
2951e3d83b
Allow nmake to ignore errors
cmd.exe can redirect file descriptor other than STDOUT, while
command.com couldn't.
2023-07-10 19:21:47 +09:00
Nobuyoshi Nakada
c8d0470bb0
Use File::NULL instead of hard coded null device names 2023-07-10 19:21:47 +09:00
Stan Lo
4e2f98be39 [ruby/irb] Avoid using Reline as a module
(https://github.com/ruby/irb/pull/633)

Using it as a module makes it harder to understand methods' source.
2023-07-09 06:25:08 +00:00
Stan Lo
33e00b79a0 [ruby/reline] Bump version to 0.3.6
(https://github.com/ruby/reline/pull/565)

2503ddb9a6
2023-07-08 08:53:46 +00:00
tomoya ishida
02f9b685e8 [ruby/reline] Ignore unhandled escape sequences
(https://github.com/ruby/reline/pull/522)

* Add unassigned escape sequence matcher to KeyStroke

* Do not insert ESC and unassigned ESC+key to input buffer
2023-07-08 08:41:30 +00:00
Jemma Issroff
31f83a6fea [ruby/yarp] Add source to ParseResult
f3802e03e0
2023-07-07 17:46:46 +00:00
Stan Lo
24d9e21f84 [ruby/reline] Reduce direct references to Reline::IOGate
(https://github.com/ruby/reline/pull/566)

* Avoid referencing IOGate from IOGate classes

The only time those classes being used is when themselves being the IOGate.
So when referencing to IOGate, it's better to use `self` instead.

* Avoid referencing to IOGate from LineEditor directly

* Avoid referencing to IOGate from Core directly

* Reference to Reline.core directly

* Replace Reline::IOGate with Reline.core.io_gate
2023-07-07 17:27:25 +00:00
Jemma Issroff
06c2d3e0a0
Resync YARP (#8036)
It got out of sync again. After this re-sync, it should happen
cherry-picking automatically.
2023-07-06 13:26:26 -04:00
Jemma Issroff
bfb933371d Manual YARP resync 2023-07-05 16:58:55 -04:00
tomoya ishida
6f9d1b4b0f [ruby/reline] Update Relin::IOGate dinamically when it is needed
(https://github.com/ruby/reline/pull/560)

4680d1c9e0
2023-07-05 20:21:13 +00:00
tomoya ishida
cd7166cc8f [ruby/reline] Fix wrong byte_pointer passed to auto_indent_proc
(https://github.com/ruby/reline/pull/562)

4348354604
2023-07-05 16:33:46 +00:00
ParadoxV5
bd93602485 Sync man pages
Co-Authored-By: David Rodríguez <2887858+deivid-rodriguez@users.noreply.github.com>
2023-07-05 11:37:23 +00:00
Jimmy H
8984442154 [rubygems/rubygems] gemfile.5: Quote default glob to escape Markdown
For consistency, I chose code format over plaintext escaping.
2023-07-05 11:37:20 +00:00
Masafumi Koba
62b4983416 [ruby/rdoc] [DOC] Improve CSS for "toggle source" hovering over one more method signatures
This commit improves the behavior of showing the "toggle source" element on mouseover.

For example, when a method has one more signatures by using `:call-seq:`,

```ruby
# :call-seq:
#   foo {|element| ... } -> self
#   foo -> new_enumeration
def foo
end
```

The current CSS doesn't show "toggle source" even when hovering the second signature `foo -> new_enumeration`.
But this change will show "toggle source" always when hovering over any signature.

For details about the `.method-header` element, see `lib/rdoc/generator/template/darkfish/class.rhtml`:
0e060c69f5/lib/rdoc/generator/template/darkfish/class.rhtml (L101-L124)

For example, see https://docs.ruby-lang.org/en/3.2/Array.html#method-i-delete
2023-07-05 04:09:08 +00:00
Vinicius Stock
f9288fb585 [ruby/rdoc] Add source_code, homepage and changelog uris to gemspec metadata [ci skip]
b93687fdd0
2023-07-05 04:08:17 +00:00
gemmaro
62754503d8 [ruby/rdoc] [DOC] Fix to use KeyboardEvent.key over keyCode
663edc807c
2023-07-05 03:39:18 +00:00
gemmaro
77fa4787bd [ruby/rdoc] Add keydown event listener to focus on search field
db62e47df2
2023-07-05 03:37:28 +00:00
Andy Waite
fd6da40fef [ruby/irb] Use max_by for longest_cmd_name_length
(https://github.com/ruby/irb/pull/628)

5e87f3bfdd

Co-authored-by: Andy Waite <andyw8@users.noreply.github.com>
2023-07-04 20:45:07 +00:00
Stan Lo
f6af5a1128 [ruby/irb] Refactor eval history
(https://github.com/ruby/irb/pull/623)

* Rename `ext/history.rb` to `ext/eval_history.rb`

To confusion with `lib/irb/history.rb`

* Add eval_history tests

* Rename eval_history's History to EvalHistory to avoid confusion
2023-07-04 15:17:41 +00:00
Alan Wu
296782ab60
YJIT: Fix autosplat miscomp for blocks with optionals (#8006)
* YJIT: Fix autosplat miscomp for blocks with optionals

When passing an array as the sole argument to `yield`, and the yieldee
takes more than 1 optional parameter, the array is expanded similar
to `*array` splat calls. This is called "autosplat" in
`setup_parameters_complex()`.

Previously, YJIT did not detect this autosplat condition. It passed the
array without expanding it, deviating from interpreter behavior.
Detect this conditon and refuse to compile it.

Fixes: Shopify/yjit#313

* RJIT: Fix autosplat miscomp for blocks with optionals

This is mirrors the same issue as YJIT. See previous commit.
2023-07-04 10:45:29 -04:00
Stan Lo
0a8b5cac66 [ruby/reline] Refactor Reline::Core
(https://github.com/ruby/reline/pull/561)

* Use Reline::Core.encoding instead of directly referencing IOGate

* Set input/output based on the IOGate's interface
2023-07-04 13:52:31 +00:00
David Rodríguez
09382135de [rubygems/rubygems] Fix git source lockfile unstability
We have some flags that limit running git commit commands under certain
situations, for example, when running under `--local`. However, those
should only affect remote git operations, not local read-only operations
like `git --version`, or `git rev-parse --abbrev-ref HEAD`.

This commit refactors things to achieve that.

By doing this, the `#to_s` representation of a source is more
consistent, since we don't get any errors when reading the checked out
branch, and we avoid some flip-flop lockfile issues.

4a529fce81
2023-07-04 14:54:26 +09:00
David Rodríguez
0ae2709dd7 [rubygems/rubygems] When printing frozen errors, print only Gemfile information
93f74abc5f
2023-07-04 14:54:25 +09:00
David Rodríguez
0fcb4c6af7 [rubygems/rubygems] Fix another incorrect removal of "ruby" platform from lockfile
When dependencies in path sources have changed, we'll be re-resolving,
and we can't really know whether the resolution will be valid or invalid
for the Ruby platform, so skip the removal in that case.

afc3b0956f
2023-07-04 14:54:25 +09:00
Stan Lo
af9eeb19d8 [ruby/irb] Stop treating history-saving logic as extension
(https://github.com/ruby/irb/pull/613)

Since `IRB.conf[:SAVE_HISTORY]` is assigned with 1000 by default, history-saving
is a feature enabled by default. So it should not be treated as an extension,
which adds unnecessary complexity to the code.
2023-07-03 13:48:23 +00:00
Benoit Daloze
4430b73cee [ruby/timeout] Require Ruby >= 2.6 for the timeout gem
* The test suite fails on 2.5.
* See https://github.com/ruby/timeout/pull/35

03873a9237
2023-07-03 09:57:07 +00:00
Nobuyoshi Nakada
3e605a7819 [ruby/tmpdir] [Bug #18933] Make Dir.mktmpdir Ractor-safe
Fix https://bugs.ruby-lang.org/issues/18933

446e636434
2023-07-03 05:47:43 +00:00
John Bachir
7e333b7abf [ruby/timeout] require ruby version in gemspec
949445f591
2023-07-02 22:51:25 +00:00
Stan Lo
4bad2a9562 [ruby/irb] Bump version to 1.7.1
(https://github.com/ruby/irb/pull/621)

b9a9dd97df
2023-07-02 04:49:07 +00:00
David Rodríguez
41779fede0 [rubygems/rubygems] Bump vendored net-http-persistent to 4.0.2
b0edf39083
2023-06-30 22:11:58 +00:00
Stan Lo
136fcd5118 [ruby/irb] Reduce internal operations' exposure to benchmarking
(https://github.com/ruby/irb/pull/618)

* Test last value is assigned with measure enabled

* Remove unnecessary `result` variable

`Context#evaluate` always assigns the result of the evaluation to `_` so
we don't need to do it in `Irb#eval_input`.

* Move benchmarking logic into `Context#evaluate`

Current location of the benchmarking logic is too high up and includes
operations like command loading and argument transformation, which should
be excluded. So this commit moves it into `Context#evaluate` to reduce the
noise.

We don't move it further down to `Workspace#evaluate` because `Context`
is an argument of the measure block, which is not available in `Workspace`.
2023-06-30 17:42:00 +00:00
tomoya ishida
9398734010 [ruby/irb] Re-implement prev_spaces feature for pasted code
(https://github.com/ruby/irb/pull/607)

9d97a192a5
2023-06-30 14:23:24 +00:00
Hiroshi SHIBATA
c7af39ecd8
Merge URI-0.12.2 for Bundler 2023-06-29 17:47:45 +09:00
Hiroshi SHIBATA
ab5421547c [ruby/uri] Bump up v0.12.2
e18e657ea8
2023-06-29 01:07:52 +00:00
Nobuyoshi Nakada
995ce947be [ruby/uri] Fix quadratic backtracking on invalid port number
https://hackerone.com/reports/1958260

9d7bcef1e6
2023-06-29 01:07:52 +00:00
Nobuyoshi Nakada
1eff362492 [ruby/uri] Fix quadratic backtracking on invalid relative URI
https://hackerone.com/reports/1958260

9010ee2536
2023-06-29 01:07:51 +00:00
Burdette Lamar
6528cf9fcf
[DOC] Fixes for link fragments (#7981) 2023-06-28 09:05:43 -04:00
Sutou Kouhei
b954a4ebc6 [ruby/csv] Bump version
e090da19b4
2023-06-28 16:37:10 +09:00
Sutou Kouhei
d6d60d4287 [ruby/csv] Fix a bug that the same line is used multiple times
GitHub: fix https://github.com/ruby/csv/pull/279

It's happen when:

* `keep_start`/`keep_{drop,back}` are nested.
  (e.g.: `strip: true, skip_lines: /.../`)
* Row separator is `\r\n`.
* `InputScanner` is used. (Small input doesn't use `InputScanner`)

Reported by Gabriel Nagy. Thanks!!!

183635ab56
2023-06-28 16:37:10 +09:00
Sutou Kouhei
539559d36e [ruby/csv] Remove nonexistent variable
bfbd6bbf6f
2023-06-28 16:37:09 +09:00