Commit graph

14659 commits

Author SHA1 Message Date
aycabta
093aaeffbc [ruby/irb] Add resetting char attr that I forgot
b5f953dc33
2021-12-21 15:36:28 +09:00
Hiroshi SHIBATA
69dc2ea465 Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +09:00
David Rodríguez
01f95ede0e [rubygems/rubygems] Rename BUNDLE_SPEC_RUN environment variable
The `BUNDLE_` prefix should be reserved to first class settings that
should be listed when running `bundle config`. This one is just a hacky
environment variable that has not corresponding documented setting.

7e255c5058
2021-12-21 06:48:27 +09:00
aycabta
37aea9d798 [ruby/reline] Finalize when exception occurred
1f8a3aee43

Co-authored-by: Alex Gittemeier <me@a.lexg.dev>
2021-12-21 00:49:03 +09:00
aycabta
c3a3f65b45 [ruby/reline] Split off set_signal_handler method
In some tests, the LineEditor#reset method is always called, but doesn't
need to set the signal handlers there, so cuts it out to a separate
method.

b143c4f5f9
2021-12-21 00:13:19 +09:00
aycabta
95c61c8d82 [ruby/reline] Remove unnecessary clearing signal handler
7a758e73dc
2021-12-21 00:13:18 +09:00
Hiroshi SHIBATA
e22c8e63e1 [ruby/logger] Bump version to 1.5.0
cdeddb2f67
2021-12-20 18:01:50 +09:00
aycabta
b96ef7684c [ruby/irb] Add East Asian Ambiguous Width to irb_info command
4cade4b7e5
2021-12-20 16:19:36 +09:00
aycabta
6ccc15c2ab [ruby/reline] Rename an unused variable name for CI
ba97f3bd87
2021-12-20 15:52:51 +09:00
aycabta
145c1e0691 [ruby/reline] Add support for overwriting dialog proc with the same name
16aa20c380
2021-12-20 14:54:42 +09:00
aycabta
c462e07a5c [ruby/reline] Add Reline.dialog_proc(name_sym)
7e5dbe4750
2021-12-20 14:54:42 +09:00
aycabta
cf508d4db9 [ruby/reline] Add space
4b7fa6b213
2021-12-20 14:53:45 +09:00
YO4
2a8ff602e0 [ruby/reline] windows jruby issue
jruby needs terminal control with Windows API  on classic console

b61bc43374
2021-12-20 14:51:52 +09:00
YO4
65cb250cb1 [ruby/reline] windows clear screen with \e 2 J
Windows Terminal does smart screen clearing when \e 2 J (not clear entire screen but scrolls down just needed)

On consoles not support sequences, ruby still converts it to API call.

c00930dab9
2021-12-20 14:51:52 +09:00
YO4
2c415cda85 [ruby/reline] windows improve scrolling
ScrollConsoleScreenBuffer can't scroll window of Windows Terminal.
Use LF to sctoll.

Microsoft says
```In the virtual terminal sequences world, the size of the window and the size of the screen buffer are fixed to the same value.
```
https://docs.microsoft.com/en-us/windows/console/window-and-screen-buffer-size

9ff3c70732
2021-12-20 14:51:51 +09:00
aycabta
a856489be6 [ruby/reline] Revert "Add a space after a comma"
This reverts commit 6009b3ef7a.

To merge a Pull Request...

83021f4267
2021-12-20 14:50:41 +09:00
aycabta
7dd0e91cac [ruby/reline] Revert "Add space"
This reverts commit 1bb071bcf5.

To merge a Pull Request...

e9fe1b1305
2021-12-20 14:46:35 +09:00
Hiroshi SHIBATA
0a198e4238 [ruby/pp] Bump version to 0.3.0
c66d1b9cdc
2021-12-20 12:44:31 +09:00
David Rodríguez
1976b38f7a [rubygems/rubygems] Add support in binstubs for trampolining bundler
If `bundler _<version>_` is given, I guess the most reasonable approach
is to completely skip version switching, because the user is technically
opting out of it. But since binstubs completely remove this argument
from `ARGV` after processing it, we have no way of detecting that it was
actually passed in the first place in order to skip the feature. So we
set `BUNDLER_VERSION` explicitly in this case.

e0f360d6d7
2021-12-20 07:42:53 +09:00
David Rodríguez
72db2e00d4 [rubygems/rubygems] Error tracing should be printed to stderr
23178f7d7b
2021-12-20 06:49:49 +09:00
Kaíque Kandy Koga
0eb1c4ea3a [ruby/irb] Add information about --extra-doc-dir option in the comments
ac3d4b9e79
2021-12-19 20:26:29 +09:00
Nobuyoshi Nakada
a81e0600a7 [ruby/reline] Load correct version.rb from gemspec
When merged to ruby/ruby, reline.gemspec file is located under
lib/reline, as the same as reline/version.rb.  That is the latter
path relative from the former differs from the ruby/reline case,
and the reline/version.rb in the default load path will be loaded.
Try `require_relative` not to load unexpected files.

54905d0e1b
2021-12-19 12:14:10 +09:00
aycabta
7159af3491 [ruby/reline] Clear dialog in pasting
dabf5313e0
2021-12-19 11:19:50 +09:00
Yusuke Endoh
52b1c76534 Manually sync d2140d795a 2021-12-19 04:13:14 +09:00
Yusuke Endoh
acac2b8128 Make RubyVM::AbstractSyntaxTree.of raise for backtrace location in eval
This check is needed to fix a bug of error_highlight when NameError
occurred in eval'ed code.
https://github.com/ruby/error_highlight/pull/16

The same check for proc/method has been already introduced since
64ac984129.
2021-12-19 03:51:37 +09:00
aycabta
1c49d809f4 [ruby/reline] Remove unnecessary "*"
7b50638e24
2021-12-18 10:18:33 +09:00
aycabta
7f2123bc08 [ruby/reline] Add a space after a comma
6009b3ef7a
2021-12-18 10:18:32 +09:00
aycabta
8cc01b668a [ruby/reline] Add space
1bb071bcf5
2021-12-18 10:15:23 +09:00
Charles Oliver Nutter
73da1c5ea3
[ruby/pp] Use etc instead of .so for broader compatibility
The use of `etc.so` here requires that etc is always implemented
as a C extension on-disk. However at least one impl – JRuby –
currently implements it as an internal extension, loaded via a
Ruby script. This require should simply use the base name of the
library, `etc`, to allow Ruby-based implementations to load as
well.

2061f994e0
2021-12-18 08:38:58 +09:00
Charles Oliver Nutter
5a6baaba38
[ruby/pp] Only do RubyVM patches if class exists
This class does not exist in any implementation except CRuby.

I would recommend moving this code somewhere else, like a separate
file loaded only on CRuby or into CRuby itself. For now this
change is sufficient to load the library on other implementations.

7d5a220f64
2021-12-18 08:38:58 +09:00
rm155
de6ef2ca71
[ruby/benchmark] Freeze VERSION
89b889b109
2021-12-18 08:38:58 +09:00
Baron Bloomer
a8b11b5cdd
[ruby/logger] Changes to datetime formatting
Formatting a datetime should only pertain to itself and valid datetimes do not contain a space. Should there be a desire to show show a space between the datetime and the process pid in the formatted log, this formatting logic should take place there.
Furthermore, the default datetime format is moved to a class variable to allowing this variable to be overwritten by subclasses.

7cbd434349
2021-12-18 08:38:57 +09:00
David Rodríguez
8d29d1292b [rubygems/rubygems] Improve errors a bit more
f481e8f41a
2021-12-17 16:35:20 +09:00
David Rodríguez
1537471871 [rubygems/rubygems] Share gem not found logic with transitive dependencies too
e4a1a9663d
2021-12-17 16:35:20 +09:00
David Rodríguez
f3b50507c7 [rubygems/rubygems] Remove unnecessary line break
84e2d6a955
2021-12-17 16:35:19 +09:00
David Rodríguez
79f72a4540 [rubygems/rubygems] Fix crash when no matching variants are found for the current platform
If we are resolving a dependency against a particular platform, and
there are no platform specific variants of the candidates that match
that platform, we should not consider those candidates.

f6077fe27d
2021-12-17 16:35:18 +09:00
David Rodríguez
c710cdb905 [rubygems/rubygems] Improve error message if only platform doesn't match
077e3c2e4d
2021-12-17 16:35:18 +09:00
David Rodríguez
af4b4fd19b [rubygems/rubygems] Improve resolver error messages
Use a more standard naming for gems.

75121e83f1
2021-12-17 16:35:17 +09:00
David Rodríguez
9f87c0cc6d [rubygems/rubygems] Pass :bimode explicitly to File.open
The `File::BINARY` flag is apparently ignored due to a ruby bug, and
thus writing can cause encoding issues.

db4efbebf2
2021-12-15 19:46:44 +09:00
Hiroshi SHIBATA
7e084ed707 Merge RubyGems and Bundler master
Merge from 793ad95ecb
2021-12-15 18:05:18 +09:00
Nobuyoshi Nakada
6eb500e2df [ruby/cgi] Extract CGI::Session#new_store_file
b3e2ff9164
2021-12-15 08:24:41 +09:00
Nobuyoshi Nakada
900e0c8c39 [ruby/securerandom] Use String#unpack1
5460a18c35
2021-12-14 11:59:22 +09:00
Nobuyoshi Nakada
0ebbab23ba [ruby/securerandom] Drop support for old ruby versions
46943a991c
2021-12-14 11:59:20 +09:00
Nobuyoshi Nakada
40b0d69dad
[DOC] Fix a type [ci skip] 2021-12-14 11:52:26 +09:00
aycabta
8411e8449b [ruby/reline] Remove unnecessary variables, lower_space
The number of lines below the cursor position was known by
"@rest_height" alone, but the problem was caused by adding
"lower_space". Remove "lower_space" as it is unnecessary.

a575cef6a3
2021-12-13 20:44:21 +09:00
Nobuyoshi Nakada
dc490aced3
[DOC] Improve Random::Formatter description and example 2021-12-13 19:55:44 +09:00
Nobuyoshi Nakada
6859d175ba
[DOC] Exclude Bundler only [ci skip] 2021-12-13 19:47:52 +09:00
Samuel Williams
b5c4570af4 [ruby/reline] Prefer wait_readable for fiber scheduler.
06b4aa31fd
2021-12-11 14:29:20 +09:00
Vyacheslav Alexeev
1a62a50c4f [rubygems/rubygems] Add github and ref options to bundle add
c3e54acab0
2021-12-11 00:13:25 +09:00
ima1zumi
5f1975a454 [ruby/reline] @convert_meta is true unless 8-bit characters
If Reline::IOGate.encoding contains 7-bit characters, convert-meta will set it On.

Because in readline(3):

>  The default is On, but readline will set it to Off if the locale contains eight-bit characters.

As far as I know, 7-bit encoding used in terminals is only US-ASCII.

b71d1fa496
2021-12-10 22:19:14 +09:00