Commit graph

14675 commits

Author SHA1 Message Date
tomoya ishida
f567633a16 [ruby/reline] Refactor input key reading
(https://github.com/ruby/reline/pull/712)

* Add key binding matching status :matching_matched

* Simplify read_2nd_character

* Add a comment of matching status and EOF

* Matching status to a constant

* Expand complicated ternary operators to case-when

64deec100b
2024-06-05 04:04:09 +00:00
Hiroshi SHIBATA
10ecdeb466
Mark to warn fiddle as bundled gems for Ruby 3.5 2024-06-05 08:35:33 +09:00
Kevin Newton
e440804d7a [ruby/prism] (parser) split up regexp content by lines
85b4a5f804
2024-06-04 20:28:54 +00:00
Kevin Newton
c2d3573c63 [ruby/prism] (parser) handle quoted symbols in hash patterns
461aa5e658
2024-06-04 20:28:54 +00:00
Kevin Newton
4354e45254 [ruby/prism] (parser) fix up srange_find to anchor at the start of the slice
aecce571d8
2024-06-04 20:28:54 +00:00
Kevin Newton
bbf9b5baad [ruby/prism] (parser) fix up nested multi write
12e079c97e
2024-06-04 20:28:53 +00:00
tomoya ishida
932ecd3a1c [ruby/reline] Ensure no escape sequence before printing prompt
(https://github.com/ruby/reline/pull/716)

f9227b5c89
2024-06-04 18:35:03 +00:00
Takashi Kokubun
5ea843f9b2 Revert "Revert "[ruby/reline] Reline::ANSI is general io. Reline::GeneralIO is not.""
This reverts commit 6e84ac2359.

Now that the rubygems spec change has been merged, let's try reverting
this and fixing it with tompng's new patch.
2024-06-04 11:33:12 -07:00
Kevin Newton
fd517a97be [ruby/prism] Revert "Revert "Properly destructure procarg0 in parser translation""
This reverts commit d8ae19d033.

df1eda2811
2024-06-04 15:05:52 +00:00
tomoya ishida
a8c1ef6a60 [ruby/irb] Remove useless Reline::Key.new and update wrong comment
for alt+d
(https://github.com/ruby/irb/pull/963)

a572180b3a
2024-06-04 12:09:15 +00:00
Hiroshi SHIBATA
8ff5458c2e
EXACT list is mostly same as SINCE list on bundled gems. 2024-06-04 18:30:39 +09:00
Hiroshi SHIBATA
f365bef0c7
Warn to use win32ole without Gemfile for Ruby 3.5 2024-06-04 18:30:39 +09:00
Takashi Kokubun
6e84ac2359 Revert "[ruby/reline] Reline::ANSI is general io. Reline::GeneralIO is not."
This reverts commit ba01d15cf5.

It seems to be failing test-bundler-parallel. Reverting it to normalize
the CI. We should revert this revert once we figure it out.
2024-06-03 16:11:54 -07:00
Kevin Newton
89ef1392f8 [ruby/prism] Revert "Properly destructure procarg0 in parser translation"
This reverts commit 823e931ff2.

d8ae19d033
2024-06-03 21:31:29 +00:00
Kevin Newton
5502890a2f [ruby/prism] Properly destructure procarg0 in parser translation
823e931ff2
2024-06-03 21:12:36 +00:00
Kevin Newton
77581dd45b [ruby/prism] Fix up steep issues
21d314eb2e
2024-06-03 20:57:48 +00:00
tomoya ishida
ba01d15cf5 [ruby/reline] Reline::ANSI is general io. Reline::GeneralIO is not.
(https://github.com/ruby/reline/pull/659)

Reline::ANSI has a partial non-tty supporting code. It should be a general io.
Reline::Dumb should be only used in testing.

2d6828473d
2024-06-03 14:28:33 +00:00
Hiroaki Osawa
5d33ff36dc [ruby/reline] In ed_search_[prev|next]_history, make the cursor come
to the end of the line when there is no search substr
(https://github.com/ruby/reline/pull/714)

* In ed_search_prev_history, make the cursor come to the end of the line when there is no search substr

* In ed_search_next_history, make the cursor come to the end of the line when there is no search substr

* Implemented ActionState to search with empty substr if the previous operation was search with empty string.

* Use a simple 2-element array to represent action_state

95ee80bd70
2024-06-03 14:05:51 +00:00
tomoya ishida
91d4a7ae0c [ruby/reline] Improve key binding match/matching check
(https://github.com/ruby/reline/pull/709)

* Improve key binding match/matching check

* Rename key_actors to default_key_bindings

* Make key_stroke.expand always return a value

* Update add_default_key_binding to use a add_default_key_binding_by_keymap internally

Co-authored-by: Stan Lo <stan001212@gmail.com>

---------

353ec236e2

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-06-03 13:15:05 +00:00
Tanaka Akira
fc495951b1 Tempfile document updated. 2024-06-02 01:12:26 +09:00
Stan Lo
cda69b5910 [ruby/reline] Overhaul io gate structure
(https://github.com/ruby/reline/pull/666)

* Overhaul IO gate structure

1. Move IO related classes to `lib/reline/io/` directory.
2. Rename `GeneralIO` to `Dumb`.
3. Use IO classes as instances instead of classes.

* Update lib/reline/io/ansi.rb

Co-authored-by: tomoya ishida <tomoyapenguin@gmail.com>

---------

dc1518e1ac

Co-authored-by: tomoya ishida <tomoyapenguin@gmail.com>
2024-06-01 10:28:08 +00:00
akr
3ee83c73c3
Tempfile.create(anonymous: true) implemented. (#10803)
The keyword argument `anonymous` is implemented for `Tempfile.create`

The default is `anonymous: false`.
The behavior is not changed as before.

The created temporary file is immediately removed if `anonymous: true` is specified.
So applications don't need to remove the file.
The actual storage of the file is reclaimed by the OS when the file is closed.

It uses `O_TMPFILE` for Linux 3.11 or later.
It creates an anonymous file from the beginning.

It uses FILE_SHARE_DELETE for Windows.
It makes it possible to remove the opened file.

[Feature #20497]
2024-06-01 15:11:19 +09:00
Martin Emde
bc40d06091 [rubygems/rubygems] String search based parsing of compact index versions
This significantly reduces memory usage.

8a76506c90
2024-05-31 20:20:03 +00:00
Kevin Newton
b5c8fb9a3f [ruby/prism] Fix up heredoc location translation for parser
a4e164e22b
2024-05-31 19:31:53 +00:00
Kevin Newton
63ea77916a [ruby/prism] Match % strings in parser
840185110f
2024-05-31 19:31:53 +00:00
Kevin Newton
1b392ba7c6 [ruby/prism] Use correct opening and closing parenthesis for array pattern in parser
beed43922c
2024-05-31 19:31:53 +00:00
Kevin Newton
47f05dffa1 [ruby/prism] Match match_hash_var when quotes are used
f2a327449a
2024-05-31 19:31:52 +00:00
Kevin Newton
02b27aca50 [ruby/prism] Match parser for match_rest in pattern
785de2c39d
2024-05-31 19:31:52 +00:00
Martin Emde
78860b8e52 [rubygems/rubygems] Move compact index concurrency to fetcher
ffd3711d00
2024-05-31 16:41:25 +00:00
David Rodríguez
10c256f98f Sychronize with rubygems/rubygems repo 2024-06-01 01:13:55 +09:00
David Rodriguez
8e2a6435e4 [rubygems/rubygems] Fix gem uninstall warning when two versions of psych installed
1b5644b666
2024-05-31 15:09:37 +00:00
David Rodríguez
f4f56b23c3 [rubygems/rubygems] Make stub sorting stable
6b70e9043d
2024-05-31 11:58:00 +00:00
Kevin Newton
72452f4387 [ruby/prism] Tests overhaul
6f886be0a4
2024-05-30 15:18:20 -04:00
David Rodríguez
4f160ad9cf [rubygems/rubygems] Don't let bundle config report a path without a Gemfile as "local app"
6aa2ac337f
2024-05-30 18:23:36 +00:00
Brandon Weaver
bc6860db23 [ruby/net-http] Update lib/net/http/header.rb
826e008cfe

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-05-30 09:16:15 +00:00
Brandon Weaver
4839493f3f [ruby/net-http] Replace Regexp in for headers for perf
15f1349e4e
2024-05-30 09:16:15 +00:00
Zopolis4
4d744a7aa7 [ruby/net-http] Add Net::HTTP.put method
6dc01c985b
2024-05-30 09:02:32 +00:00
Hiroshi SHIBATA
f23c96581f
Update generated code from 5c7ea6fa15 2024-05-30 18:00:25 +09:00
Hiroshi SHIBATA
ba8e6e77fd
Revert "[rubygems/rubygems] Fix gem pristine sometimes failing to pristine user installed gems"
This reverts commit a3edc4abc5.

That commit caused test failure with Windows platform.

* 2556187139
* 2556187306
2024-05-30 12:46:19 +09:00
Adam Daniels
01aa77faa2 [ruby/rdoc] Abort with error message if --dump argument invalid
When --dump=FILE is passed a path that does not exist or is not
readable, it silently fails.

0536b83c46
2024-05-30 00:09:22 +00:00
David Rodriguez
a3edc4abc5 [rubygems/rubygems] Fix gem pristine sometimes failing to pristine user installed gems
0eb6ed8f86
2024-05-29 15:35:04 +00:00
Mari Imaizumi
b0e6446b9f [ruby/reline] Bump version to 0.5.8
(https://github.com/ruby/reline/pull/711)

43cd4c5d58
2024-05-29 14:45:39 +00:00
David Rodríguez
939d389c54 [rubygems/rubygems] Improve default gem handling by treating default gems as any other gem
For backwards compatibility, make sure default gems are still used as a
last resort when materializing, in case no remote, cached, or installed
specs are found.

93788f689f
2024-05-29 13:55:25 +00:00
Darren Kavanagh
2c8b2f5b55 [rubygems/rubygems] Clarify BUNDLE_USER_CONFIG is a file
0b284fc88c
2024-05-28 20:15:45 +00:00
David Rodríguez
6b3935250e [rubygems/rubygems] Bump COCs to latest Contributor Covenant version
73794a95b9
2024-05-28 15:10:59 +00:00
verdy89
7c6e4bc7ca [ruby/reline] Implement the redo command
(https://github.com/ruby/reline/pull/707)

* Implement the redo command

* Commented out a test that does not pass

* Changed key assignment for redo from "\C-[" to "\C-g"

* Changed redo key assignment from `\C-g` to `\M-\C-_`

* Revert the first implemantation

* Implemented redo by sharing `@past_lines` between undo and redo

* Fixed the index of past_lines that is updated when the cursor is moved

* Fixed deletion of the redo history in regular input

* Renamed variables: past_lines -> input_lines

* Rename @position to @input_lines_position

* Deleted unused variables: `@old_byte_pointer` and `@old_line_index`

0b2d9fab5f
2024-05-27 16:38:22 +00:00
License Update
5853a38043 [rubygems/rubygems] Update SPDX license list as of 2024-05-22
f91ac04397
2024-05-27 01:45:38 +00:00
Marcus Stollsteimer
4949f0a928 [rubygems/rubygems] Fix typo in description of build:checksum task
351ff2512f
2024-05-26 21:42:45 +00:00
Go
508f331048 [ruby/reline] allow space in config value
(https://github.com/ruby/reline/pull/705)

* allow space in config value

fix https://github.com/ruby/reline/pull/657

* remove inline comments

* Revert "remove inline comments"

This reverts commit 2438347c1a.

* refactoring

* remove unnecessary comment handling

d60f1e1e39
2024-05-26 08:28:25 +00:00
Martin Emde
6b0afbb111 [rubygems/rubygems] Reorganize and refactor CompactIndexClient
71bcf354f5
2024-05-25 17:47:07 +00:00