Commit graph

12164 commits

Author SHA1 Message Date
Jenny Shen
24913e3dda [rubygems/rubygems] Move Webauthn listener thread to WebauthnListener class
6ec474975e
2023-07-28 16:08:08 +00:00
Jenny Shen
fce04f9a6c [rubygems/rubygems] Move WebauthnListener into the Gem::GemcutterUtilities namespace
3080394f81
2023-07-28 16:08:08 +00:00
Jenny Shen
108cc38a76 [rubygems/rubygems] Extract polling logic into its own class
218b83abed
2023-07-28 16:08:07 +00:00
Jenny Shen
023d0f662b [rubygems/rubygems] Add Webauthn verification poller to fetch OTP
39c5e86a67
2023-07-28 16:08:07 +00:00
Hiroshi SHIBATA
2deeb0e0bf Removed unnecessary methods 2023-07-28 14:57:10 +09:00
Hiroshi SHIBATA
35517baae5 Use Gem::BUNDLED_GEMS::SINCE 2023-07-28 14:57:10 +09:00
Nobuyoshi Nakada
989f3add62 Warn default gems which will be gemified in future 2023-07-28 14:57:10 +09:00
Xavier Noria
437a4ccbf2 [rubygems/rubygems] Restore support for Pathname objects in the replaced require
f7b4282ef7
2023-07-27 23:07:19 +00:00
osyo-manga
ccca097cb5 [ruby/reline] Add kill-word and backward-kill-word keymapping
support.
(https://github.com/ruby/reline/pull/570)

Fix it
https://github.com/ruby/reline/issues/558

0f8000443e

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-07-27 09:08:24 +00:00
Stan Lo
b201ac0bc0 [ruby/reline] Bump version to 0.3.7
(https://github.com/ruby/reline/pull/578)

dc5a1b7c48
2023-07-27 08:23:08 +00:00
Stan Lo
283b2fdab4 [ruby/irb] Page ls's output (https://github.com/ruby/irb/pull/657)
* Page ls command's output

* Use Pager.page_content in show_cmds too

82d1687302
2023-07-26 08:32:02 +00:00
Hiroshi SHIBATA
6500f85927
Added Gem::BUNDLED_GEMS for warning feature of Bundler 2023-07-26 08:51:57 +09:00
Stan Lo
d8cee55073 [ruby/irb] Display show_cmds's output in a pager when in TTY
environment
(https://github.com/ruby/irb/pull/647)

This can:

- Make it easier to scroll up and down the commands list
- Avoid pushing up users' previous output
- Allow users to do basic search with `/<word>`

f94e8a66dd
2023-07-25 18:33:23 +00:00
Stan Lo
377639053d [ruby/reline] Avoid using CSI # S for scroll down
(https://github.com/ruby/reline/pull/577)

b67ee4e791
2023-07-25 09:39:58 +00:00
Hiroshi SHIBATA
cf1f2e9d06 [rubygems/rubygems] bin/rubocop -A
e8a4184429
2023-07-25 06:23:29 +00:00
Hiroshi SHIBATA
979d1fa5fe [rubygems/rubygems] Extract Gem::BUNDLED_GEMS from Bundler
e30e86aa60
2023-07-25 06:23:28 +00:00
Hiroshi SHIBATA
8fbe7d0295 [rubygems/rubygems] Skip warnings if bundled gems is already loaded
9583a7eb82
2023-07-25 06:23:28 +00:00
Hiroshi SHIBATA
422144d220 [rubygems/rubygems] Use Kernel.singleton_class
f2e8e054df
2023-07-25 06:23:27 +00:00
Hiroshi SHIBATA
6bb34a7684 [rubygems/rubygems] Don't reuse require argument
1712cd6149
2023-07-25 06:23:27 +00:00
Hiroshi SHIBATA
64530b545f [rubygems/rubygems] Added warnings targets for old version of Ruby
d0c1d97105
2023-07-25 06:23:26 +00:00
Hiroshi SHIBATA
fc5dbea4c3 [rubygems/rubygems] Added Ruby version for bundled gems to warnings
d61c1362e7
2023-07-25 06:23:26 +00:00
Hiroshi SHIBATA
ec600332fc [rubygems/rubygems] Simplefied condition
5238fcf234
2023-07-25 06:23:25 +00:00
Hiroshi SHIBATA
2424b921b2 [rubygems/rubygems] make bundled gemst list as constant under Gem namespace
438eac5447
2023-07-25 06:23:25 +00:00
Hiroshi SHIBATA
0ae227ebe2 [rubygems/rubygems] Also check Kernel.require for infinite loop
961d9ac1bd
2023-07-25 06:23:23 +00:00
Hiroshi SHIBATA
a23fe8e84d [rubygems/rubygems] Avoid infinite call of require
9c345bfa3e
2023-07-25 06:23:23 +00:00
Hiroshi SHIBATA
bb61e45ae7 [rubygems/rubygems] Keep Kernel#require private
cd59e73efa
2023-07-25 06:23:22 +00:00
Hiroshi SHIBATA
95cde6e4c2 [rubygems/rubygems] Don't use redefine_method
f733f90110
2023-07-25 06:23:22 +00:00
Hiroshi SHIBATA
f5e03ef31c [rubygems/rubygems] Warn if file is loaded without Gemfile
bf59dcdad1
2023-07-25 06:23:21 +00:00
Nobuyoshi Nakada
70eeec0cad [rubygems/rubygems] Simplify double loop
630dc02112
2023-07-25 04:52:54 +00:00
Nobuyoshi Nakada
1b27e7aa1f [rubygems/rubygems] Use Monitor#synchronize to ensure to exit
b424353239
2023-07-25 04:52:54 +00:00
Kentaro Takeyama
f72ddd92be [rubygems/rubygems] Bundler: Update bundle-outdated(1) man
Updated output examples to current format since the output format has changed since version 2.2.0.dev

48d98f906a
2023-07-24 23:58:06 +00:00
Hiroshi SHIBATA
dd1af4b22d
[rubygems/rubygems] Rename local to lockfile and global to system
456fd05d3a
2023-07-24 15:04:24 +09:00
David Rodríguez
34f541ae36
[rubygems/rubygems] Avoid unnecessary network requests for local gem
ec5f04f7b1
2023-07-24 15:03:15 +09:00
David Rodríguez
0b0df03b0d
[rubygems/rubygems] Avoid printing using messages when version has not changed
9635a2fd74
2023-07-24 15:03:15 +09:00
David Rodríguez
8c82b35791
[rubygems/rubygems] Exclude Bundler from missing locked dependencies check
Bundler is special since it's not actually locked in the lockfile as a
regular gem (only via `BUNDLED WITH`). So exclude it from that check.

9f1756ec47
2023-07-24 15:03:15 +09:00
Hiroshi SHIBATA
7fdf98ef39 [rubygems/rubygems] Deprecate Gem::Platform.match
e3ba3e2225
2023-07-21 08:47:55 +00:00
Nobuyoshi Nakada
f602cb55d7 [rubygems/rubygems] Boundary check in Gem::StreamUI#choose_from_list
abacb0cb34
2023-07-21 07:48:49 +00:00
Jemma Issroff
134d874173
Sync YARP gemspec (#8101)
* Sync YARP gemspec

We were previously not syncing the YARP gemspec over which meant
that the Ruby YARP gem was out of sync.

* Sync YARP node / lex_compat files
2023-07-20 14:51:17 -04:00
Jean Boussier
460c27dc15 [ruby/syntax_suggest] Handle new eval source location
See https://bugs.ruby-lang.org/issues/19755

In Ruby 3.3, using `eval` without providing a source location
will now default to `"(eval at #{__FILE__}:#{__LINE__})"`.

8e5076472e
2023-07-20 17:58:52 +00:00
Nobuyoshi Nakada
419fbc77e0 [rubygems/rubygems] Clear YAML constant if it was undefined previously
31d0311258
2023-07-19 23:20:54 +00:00
tomoya ishida
ca561480ea [ruby/reline] Always set ANSI CSI keybindings for Home, End, and
Arrow.
(https://github.com/ruby/reline/pull/569)

f363a43a45
2023-07-19 13:25:58 +00:00
osyo-manga
45fd006185 [ruby/reline] Fix [nil] is passed to auto_indent_proc when exit with
CTRL+d
(https://github.com/ruby/reline/pull/571)

* Fix [nil] is passed to auto_indent_proc when exit with CTRL+d

Fix it https://github.com/ruby/reline/issues/556

* not call auto_indent_proc when Ctrl+d.

see: https://github.com/ruby/reline/pull/571#issuecomment-1637183195

0924f2a075
2023-07-18 20:33:39 +00:00
Stan Lo
0db58dd0db [ruby/irb] Declare rdoc as dependency
(https://github.com/ruby/irb/pull/648)

IRB already has several features that rely on rdoc, such as:

- Autocompletion's document dialog
- Autocompletion's `PerfectMatchedProc`
- The `show_doc` command
- Easter egg

And we could use its pager more in the future too. So it makes sense to
declare rdoc as a dependency instead of relying on the one bundled with
Ruby.

4dffbb1dd3
2023-07-18 13:53:31 +00:00
Alan Wu
f302e725e1
Remove __bp__ and speed-up bmethod calls (#8060)
Remove rb_control_frame_t::__bp__ and optimize bmethod calls

This commit removes the __bp__ field from rb_control_frame_t. It was
introduced to help MJIT, but since MJIT was replaced by RJIT, we can use
vm_base_ptr() to compute it from the SP of the previous control frame
instead. Removing the field avoids needing to set it up when pushing new
frames.

Simply removing __bp__ would cause crashes since RJIT and YJIT used a
slightly different stack layout for bmethod calls than the interpreter.
At the moment of the call, the two layouts looked as follows:

                   ┌────────────┐    ┌────────────┐
                   │ frame_base │    │ frame_base │
                   ├────────────┤    ├────────────┤
                   │    ...     │    │    ...     │
                   ├────────────┤    ├────────────┤
                   │    args    │    │    args    │
                   ├────────────┤    └────────────┘<─prev_frame_sp
                   │  receiver  │
    prev_frame_sp─>└────────────┘
                     RJIT & YJIT      interpreter

Essentially, vm_base_ptr() needs to compute the address to frame_base
given prev_frame_sp in the diagrams. The presence of the receiver
created an off-by-one situation.

Make the interpreter use the layout the JITs use for iseq-to-iseq
bmethod calls. Doing so removes unnecessary argument shifting and
vm_exec_core() re-entry from the interpreter, yielding a speed
improvement visible through `benchmark/vm_defined_method.yml`:

     patched:   7578743.1 i/s
      master:   4796596.3 i/s - 1.58x  slower

C-to-iseq bmethod calls now store one more VALUE than before, but that
should have negligible impact on overall performance.

Note that re-entering vm_exec_core() used to be necessary for firing
TracePoint events, but that's no longer the case since
9121e57a5f.

Closes ruby/ruby#6428
2023-07-17 13:57:58 -04:00
tomoya ishida
be98bfc4ee [ruby/irb] Indent multiline percent literals
(https://github.com/ruby/irb/pull/643)

18bb4022a9
2023-07-15 18:12:05 +00:00
ima1zumi
7ffb995f5e [ruby/irb] Bump 1.7.4 (https://github.com/ruby/irb/pull/645)
b0f650a766
2023-07-15 15:59:18 +00:00
Jemma Issroff
6d2174477b [ruby/yarp] Remove pattern matching pinning to enable support for <= Ruby 3.0
Pattern matching variable pinning was introduced in Ruby 3.1. We
need to remove it from YARP to support earlier rubies.

b792c58e3b
2023-07-14 21:00:51 +00:00
Stan Lo
174bc22570 [ruby/irb] Fix history-saving feature
(https://github.com/ruby/irb/pull/642)

* Define RelineInputMethod::HISTORY

The HistorySavingAbility module doesn't do anything if the input method
class doesn't define HISTORY.

- 3ac96be660/lib/irb/history.rb (L10)
- 3ac96be660/lib/irb/history.rb (L34)

This patch defines RelineInputMethod::HISTORY to avoid this.

* Improve history-saving's ability check

Instead of checking the existence of `input_method_class::HISTORY`, we should
make every input method class declare if it supports history saving or not.

Since the default value is `false`, it shouldn't break any custom input method
that inherits from `IRB::InputMethod`.

aec7a5b3f5
2023-07-14 15:45:09 +00:00
Peter Zhu
3223181284 Remove RARRAY_CONST_PTR_TRANSIENT
RARRAY_CONST_PTR now does the same things as RARRAY_CONST_PTR_TRANSIENT.
2023-07-13 14:48:14 -04:00
B. Burt
0454887a0e [ruby/getoptlong] [DOC] Add spaces to fix formatting in example
To make the example code verbatim.
Fixes ruby/ruby#8061

85fe502916
2023-07-13 12:30:23 +00:00