Граф коммитов

12002 Коммитов

Автор SHA1 Сообщение Дата
Josh Nichols 4d21134f3f [ruby/net-http] freeze rest of lib
https://github.com/ruby/net-http/commit/455a74734a
2023-08-16 01:40:09 +00:00
Josh Nichols 4165ec91d8 [ruby/net-http] update net/http/response to be frozen string literal
https://github.com/ruby/net-http/commit/dc3b4a75ca
2023-08-16 01:40:08 +00:00
Josh Nichols 2fbd8dca18 [ruby/net-http] turn on frozen strings for net/http/generic_request
https://github.com/ruby/net-http/commit/b92ade088d
2023-08-16 01:40:08 +00:00
Josh Nichols 8d04260acd [ruby/net-http] turn on frozen strings for net/http/header
https://github.com/ruby/net-http/commit/a5203c9f92
2023-08-16 01:40:07 +00:00
Josh Nichols 0300ea5a6c [ruby/net-http] Improve performance of HTTPHeader#content_type
In the existing implementation, `main_type` and `sub_type` would end up
being called multiple times potentially.

Instead of doing that, save the result so it can be re-used.

https://github.com/ruby/net-http/commit/179976f7ea
2023-08-16 01:39:08 +00:00
Stan Lo 7f8f62c93b [ruby/irb] Support seamless integration with ruby/debug
(https://github.com/ruby/irb/pull/575)

* Support native integration with ruby/debug

* Prevent using multi-irb and activating debugger at the same time

Multi-irb makes a few assumptions:

- IRB will manage all threads that host sub-irb sessions
- All IRB sessions will be run on the threads created by IRB itself

However, when using the debugger these assumptions are broken:

- `debug` will freeze ALL threads when it suspends the session (e.g. when
  hitting a breakpoint, or performing step-debugging).
- Since the irb-debug integration runs IRB as the debugger's interface,
  it will be run on the debugger's thread, which is not managed by IRB.

So we should prevent the 2 features from being used at the same time.
To do that, we check if the other feature is already activated when
executing the commands that would activate the other feature.

https://github.com/ruby/irb/commit/d8fb3246be
2023-08-13 18:30:34 +00:00
Stan Lo 9099d62ac7 [ruby/irb] Move IO configuration to IRB::Irb
(https://github.com/ruby/irb/pull/681)

It shouldn't be `RubyLex`'s responsibility to handle IO. So this moves
the configuration to `IRB::Irb`.

https://github.com/ruby/irb/commit/daff750076
2023-08-13 15:23:04 +00:00
Nobuyoshi Nakada 3af5badae8 [ruby/irb] Remove useless `begin`/`end` [ci skip]
(https://github.com/ruby/irb/pull/680)

The `rescue` was removed at https://github.com/ruby/irb/commit/420e7d227011.

https://github.com/ruby/irb/commit/8fa688e9c0
2023-08-13 15:02:29 +00:00
tomoya ishida e1683b4958 [ruby/irb] Drop showing indent level number in DEFAULT prompt and
INF_RUBY prompt
(https://github.com/ruby/irb/pull/679)

* Drop showing indent level number in DEFAULT prompt and INF_RUBY prompt

* Update prompt part of test_rendering's expected result

https://github.com/ruby/irb/commit/3847532e54
2023-08-12 10:19:24 +00:00
Stan Lo 680835085d [ruby/irb] Reline/ReadlineInputMethod should inherit
StdioInputMethod
(https://github.com/ruby/irb/pull/671)

They are both built on top of stdio and are basically extended version
of StdioInputMethod. They also share several attributes and methods with
StdioInputMethod.

https://github.com/ruby/irb/commit/c5f5abdbde
2023-08-12 10:17:52 +00:00
tomoya ishida d42891079f [ruby/irb] Remove needless removal of trailing whitespace in
check_code_state
(https://github.com/ruby/irb/pull/678)

https://github.com/ruby/irb/commit/4a6af7d1ed
2023-08-11 18:51:25 +00:00
Stan Lo 0781e55206 [ruby/irb] Move assignment check to RubyLex
(https://github.com/ruby/irb/pull/670)

Since assignment check relies on tokenization with `Ripper`, it feels like
the responsibility of `RubyLex`. `Irb#eval_input` should simply get the result
when calling `each_top_level_statement` on `RubyLex`.

https://github.com/ruby/irb/commit/89d1adb3fd
2023-08-11 18:44:52 +00:00
Stan Lo 43721b1d4a [ruby/irb] Don't echo an expression's result when it ends with a
semicolon
(https://github.com/ruby/irb/pull/669)

https://github.com/ruby/irb/commit/50185c2833
2023-08-11 16:18:58 +00:00
Stan Lo d3311e5cc3 [ruby/irb] Add black and white color to IRB::Color
(https://github.com/ruby/irb/pull/676)

https://github.com/ruby/irb/commit/a2763acade
2023-08-11 16:03:11 +00:00
Stan Lo ab0f90f1f5 [ruby/irb] Fix nested IRB sessions' history saving
(https://github.com/ruby/irb/pull/652)

1. Dynamically including `HistorySavingAbility` makes things unnecessarily
   complicated and should be avoided.
2. Because both `Reline` and `Readline` use a single `HISTORY` constant
   to store history data. When nesting IRB sessions, only the first IRB
   session should handle history loading and saving so we can avoid
   duplicating history.
3. History saving callback should NOT be stored in `IRB.conf` as it's
   recreated every time `IRB.setup` is called, which would happen when
   nesting IRB sessions.

https://github.com/ruby/irb/commit/0fef0ae160
2023-08-09 14:57:52 +00:00
Takashi Kokubun cd8d20cd1f
YJIT: Compile exception handlers (#8171)
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-08-08 16:06:22 -07:00
Stan Lo 0387b86c3a [ruby/irb] Remove unused `InputMethod#initialize`
(https://github.com/ruby/irb/pull/635)

* Remove unused InputMethod#initialize

The constructor takes a `file_name` argument, but it is never used. The
only input method that needs a file is `FileInputMethod`, which has its
own constructor to take a file object directly.

So the constructor in `InputMethod` is not needed and its child classes
don't need to call `super` in their constructors.

* Remove unused FileInputMethod#file_name

https://github.com/ruby/irb/commit/153b1e9d1c
2023-08-07 15:30:13 +00:00
Benoit Daloze 70ef66f240 [ruby/yarp] Document the build system of YARP
https://github.com/ruby/yarp/commit/85ae0e2816
2023-08-05 17:30:34 +00:00
Nobuyoshi Nakada 4e6861d337 Fix `Gem::BUNDLED_GEMS.find_gem` return value
If the required name is different from the found gem name, return the
gem name, instead of true that means the required name is an exact gem
name.
2023-08-05 18:56:37 +09:00
Hiroshi SHIBATA 6b570ff2c0 Display call location with bundled gems warning 2023-08-04 21:12:09 +09:00
Hiroshi SHIBATA ae8fd392d5 Fixed worng key of bundled_gems list 2023-08-04 21:12:09 +09:00
Hiroshi SHIBATA a0b695b4e6 Also decorate warning message with future tense for bundler 2023-08-04 21:12:09 +09:00
Hiroshi SHIBATA ede3c5ee0f Use future tense if current version is older than list version 2023-08-04 21:12:09 +09:00
Stan Lo 32e828bb4a [ruby/irb] Deprecate multi-irb commands
(https://github.com/ruby/irb/pull/654)

* Deprecate multi-irb commands

- Print deprecated message when any of the commands are used
- Put related commands under `Multi-irb` category with a deprecated
  label

* Update readme

https://github.com/ruby/irb/commit/861731ac12
2023-08-02 18:35:08 +00:00
Hiroshi SHIBATA 28c2136722 [rubygems/rubygems] Replaced remained local to lockfile
https://github.com/rubygems/rubygems/commit/6ed69223d4
2023-08-02 09:56:13 +00:00
Stan Lo 201fd57518 [ruby/irb] Drop src_encoding.rb
(https://github.com/ruby/irb/pull/634)

Its method `IRB.default_src_encoding` was only used in `magic-file.rb`,
which has been removed.

https://github.com/ruby/irb/commit/ed98983b1f
2023-08-02 18:17:27 +09:00
Stan Lo f11ac06337 [ruby/irb] Add workspace category
(https://github.com/ruby/irb/pull/661)

* Create a new Workspace command category

* Update readme

https://github.com/ruby/irb/commit/310650c213
2023-08-01 12:51:30 +00:00
Hiroshi SHIBATA de91ce980a [rubygems/rubygems] Use Kernel.singleton_class
https://github.com/rubygems/rubygems/commit/9be984f281
2023-08-01 00:31:22 +00:00
Kevin Newton 04f4e0aeb2 [ruby/yarp] Document building, more macro changes
https://github.com/ruby/yarp/commit/4214f262d2
2023-07-31 20:10:23 +00:00
Stan Lo 5d78ec8a94 [ruby/irb] Decouple `edit` and `show_source` commands
(https://github.com/ruby/irb/pull/658)

* Decouple `edit` command from `show_source`

2 commands should not depend on each other. If `edit` command also needs
to find a source, the source finding logic should be extracted into a
separate class.

* Return nil if is not an actual file path

* Refactor SourceFinder

https://github.com/ruby/irb/commit/9790517a0c
2023-07-31 19:57:36 +00:00
Mat Sadler a3c0e9d90d [rubygems/rubygems] update Magnus library in Rust extension gem template
https://github.com/rubygems/rubygems/commit/19a92a3367
2023-07-31 06:25:21 +00:00
Nobuyoshi Nakada dfad14d83f [ruby/optparse] [DOC] Mark up constant and method names as code
https://github.com/ruby/optparse/commit/e8bee0be8f
2023-07-30 02:35:22 +00:00
Nobuyoshi Nakada 67be453d9d [rubygems/rubygems] Set thread configurations inside block in the thread local manner
https://github.com/rubygems/rubygems/commit/965e54b8f1
2023-07-30 01:37:43 +00:00
Nobuyoshi Nakada 0d86cc4caf [rubygems/rubygems] Use the dedicated method to convert file path
The dedicated method `File.path` to deal with pathname-like objects
has been provided since ruby 1.9.0.
Also adds a test for rubygems/rubygems#6837.

https://github.com/rubygems/rubygems/commit/258c6eda80
2023-07-30 01:36:23 +00:00
Benoit Daloze df5330b04e [ruby/rdoc] Use a more portable way to check if code is parseable
* The same as used in irb: https://github.com/ruby/irb/pull/134/files
* This works on all Ruby implementations, unlike `return` in BEGIN which
  can be quite difficult to support.

https://github.com/ruby/rdoc/commit/d19f7c66fe
2023-07-29 15:31:48 +00:00
ko1 bcf823fddb Revert "[rubygems/rubygems] Set thread configurations inside block"
This reverts commit db80e947a3.

This patch uses `Thread.abort_on_exception = true` and it affects
all of threads. This is why CI systems fails.

How to modify:

- use `thread.abort_on_exception = true` for specific threads
- Run this code in a separated process
2023-07-29 07:39:10 +09:00
Jenny Shen 17b50cdb68 [rubygems/rubygems] Add charset to Webauthn response content-type
https://github.com/rubygems/rubygems/commit/442a3e8f37
2023-07-28 16:08:11 +00:00
Jenny Shen db80e947a3 [rubygems/rubygems] Set thread configurations inside block
https://github.com/rubygems/rubygems/commit/860b145359
2023-07-28 16:08:10 +00:00
Jenny Shen 24913e3dda [rubygems/rubygems] Move Webauthn listener thread to WebauthnListener class
https://github.com/rubygems/rubygems/commit/6ec474975e
2023-07-28 16:08:08 +00:00
Jenny Shen fce04f9a6c [rubygems/rubygems] Move WebauthnListener into the Gem::GemcutterUtilities namespace
https://github.com/rubygems/rubygems/commit/3080394f81
2023-07-28 16:08:08 +00:00
Jenny Shen 108cc38a76 [rubygems/rubygems] Extract polling logic into its own class
https://github.com/rubygems/rubygems/commit/218b83abed
2023-07-28 16:08:07 +00:00
Jenny Shen 023d0f662b [rubygems/rubygems] Add Webauthn verification poller to fetch OTP
https://github.com/rubygems/rubygems/commit/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
https://github.com/rubygems/rubygems/commit/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

https://github.com/ruby/reline/commit/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)

https://github.com/ruby/reline/commit/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

https://github.com/ruby/irb/commit/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>`

https://github.com/ruby/irb/commit/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)

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

https://github.com/rubygems/rubygems/commit/48d98f906a
2023-07-24 23:58:06 +00:00
Hiroshi SHIBATA dd1af4b22d
[rubygems/rubygems] Rename local to lockfile and global to system
https://github.com/rubygems/rubygems/commit/456fd05d3a
2023-07-24 15:04:24 +09:00
David Rodríguez 34f541ae36
[rubygems/rubygems] Avoid unnecessary network requests for local gem
https://github.com/rubygems/rubygems/commit/ec5f04f7b1
2023-07-24 15:03:15 +09:00
David Rodríguez 0b0df03b0d
[rubygems/rubygems] Avoid printing using messages when version has not changed
https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/9f1756ec47
2023-07-24 15:03:15 +09:00
Hiroshi SHIBATA 7fdf98ef39 [rubygems/rubygems] Deprecate Gem::Platform.match
https://github.com/rubygems/rubygems/commit/e3ba3e2225
2023-07-21 08:47:55 +00:00
Nobuyoshi Nakada f602cb55d7 [rubygems/rubygems] Boundary check in `Gem::StreamUI#choose_from_list`
https://github.com/rubygems/rubygems/commit/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__})"`.

https://github.com/ruby/syntax_suggest/commit/8e5076472e
2023-07-20 17:58:52 +00:00
Nobuyoshi Nakada 419fbc77e0 [rubygems/rubygems] Clear `YAML` constant if it was undefined previously
https://github.com/rubygems/rubygems/commit/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)

https://github.com/ruby/reline/commit/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

https://github.com/ruby/reline/commit/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.

https://github.com/ruby/irb/commit/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)

https://github.com/ruby/irb/commit/18bb4022a9
2023-07-15 18:12:05 +00:00
ima1zumi 7ffb995f5e [ruby/irb] Bump 1.7.4 (https://github.com/ruby/irb/pull/645)
https://github.com/ruby/irb/commit/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.

https://github.com/ruby/yarp/commit/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`.

https://github.com/ruby/irb/commit/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

https://github.com/ruby/getoptlong/commit/85fe502916
2023-07-13 12:30:23 +00:00
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.

https://github.com/rubygems/rubygems/commit/582eb2ef39
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA d3305cab44
[rubygems/rubygems] restart with BUNDLE_VERSION if it's specified
https://github.com/rubygems/rubygems/commit/57cfe7cf8d
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA f16c880f77
[rubygems/rubygems] Introduce bundle config set version feature
https://github.com/rubygems/rubygems/commit/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)

https://github.com/ruby/irb/commit/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.

https://github.com/ruby/irb/commit/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.

https://github.com/rubygems/rubygems/commit/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)

https://github.com/ruby/irb/commit/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
https://github.com/rubygems/rubygems/commit/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)

https://github.com/ruby/reline/commit/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
https://github.com/ruby/yarp/commit/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)

https://github.com/ruby/reline/commit/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)

https://github.com/ruby/reline/commit/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]
https://github.com/ruby/rdoc/commit/b93687fdd0
2023-07-05 04:08:17 +00:00
gemmaro 62754503d8 [ruby/rdoc] [DOC] Fix to use KeyboardEvent.key over keyCode
https://github.com/ruby/rdoc/commit/663edc807c
2023-07-05 03:39:18 +00:00
gemmaro 77fa4787bd [ruby/rdoc] Add keydown event listener to focus on search field
https://github.com/ruby/rdoc/commit/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)

https://github.com/ruby/irb/commit/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.

https://github.com/rubygems/rubygems/commit/4a529fce81
2023-07-04 14:54:26 +09:00
David Rodríguez 0ae2709dd7 [rubygems/rubygems] When printing frozen errors, print only Gemfile information
https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/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

https://github.com/ruby/timeout/commit/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

https://github.com/ruby/tmpdir/commit/446e636434
2023-07-03 05:47:43 +00:00
John Bachir 7e333b7abf [ruby/timeout] require ruby version in gemspec
https://github.com/ruby/timeout/commit/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)

https://github.com/ruby/irb/commit/b9a9dd97df
2023-07-02 04:49:07 +00:00
David Rodríguez 41779fede0 [rubygems/rubygems] Bump vendored net-http-persistent to 4.0.2
https://github.com/rubygems/rubygems/commit/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)

https://github.com/ruby/irb/commit/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
https://github.com/ruby/uri/commit/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

https://github.com/ruby/uri/commit/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

https://github.com/ruby/uri/commit/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
https://github.com/ruby/csv/commit/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!!!

https://github.com/ruby/csv/commit/183635ab56
2023-06-28 16:37:10 +09:00
Sutou Kouhei 539559d36e [ruby/csv] Remove nonexistent variable
https://github.com/ruby/csv/commit/bfbd6bbf6f
2023-06-28 16:37:09 +09:00
Sutou Kouhei 1f46793406 [ruby/csv] parser: add one more trace
https://github.com/ruby/csv/commit/5df650be0c
2023-06-28 16:37:09 +09:00
Nobuyoshi Nakada ae71bbbc44 [ruby/syntax_suggest] [DOC] Fix method name
https://github.com/ruby/syntax_suggest/commit/08a9afb64f
2023-06-28 16:34:53 +09:00
tomoya ishida 8aedfefb21 [ruby/irb] Remove keyword exception from Context#evaluate because
the value is always nil
(https://github.com/ruby/irb/pull/617)

https://github.com/ruby/irb/commit/62691384f8
2023-06-27 20:43:53 +00:00
Stan Lo caddd0274b [ruby/irb] Move input line mutation out of `Context#evaluate`
(https://github.com/ruby/irb/pull/615)

This makes sure `Context#evaluate` really just evaluates the input.
It will also make #575's implementation cleaner.
2023-06-27 19:51:18 +00:00
Hiroshi SHIBATA 9dd8698597 [rubygems/rubygems] Fixup
https://github.com/rubygems/rubygems/pull/6766

https://github.com/rubygems/rubygems/commit/c5c5797227
2023-06-27 07:37:24 +00:00
Hiroshi SHIBATA a99d0c1555 [rubygems/rubygems] Removed unused variable
https://github.com/rubygems/rubygems/commit/68cc941bed
2023-06-27 02:15:40 +00:00
Hiroshi SHIBATA 65c2179336 [rubygems/rubygems] Molinillo::DependencyGraph is initialized in Molinillo::Resolver#resolve
https://github.com/rubygems/rubygems/commit/1c39e24c95
2023-06-27 02:15:40 +00:00
Nobuyoshi Nakada 8307627245 [ruby/uri] String literals are frozen now
https://github.com/ruby/uri/commit/0b6ad60af6
2023-06-25 15:45:32 +00:00
Nobuyoshi Nakada c21436cb35 [ruby/uri] Fix host part in relative referece #83
In relative referece, host part can be ommitted but can not be empty.

https://github.com/ruby/uri/commit/2980f0ba02
2023-06-25 15:24:05 +00:00
tomoya ishida 00216c8aa0 [ruby/irb] Fix process_continue(rename to should_continue?) and
check_code_block(rename to check_code_syntax)
(https://github.com/ruby/irb/pull/611)

https://github.com/ruby/irb/commit/b7f4bfaaa4
2023-06-25 05:12:16 +00:00
tomoya ishida 406799cae8 [ruby/irb] Omit nesting_level, use indent_level to build prompt
string
(https://github.com/ruby/irb/pull/610)

https://github.com/ruby/irb/commit/f01ff0811b
2023-06-24 22:20:43 +00:00
Hiroshi SHIBATA b7375770ef [ruby/timeout] Bump up v0.4.0
https://github.com/ruby/timeout/commit/413194f8d2
2023-06-23 03:52:03 +00:00
Jeremy Evans e8c9385123 [ruby/timeout] Raise exception instead of throw/catch for timeouts
(https://github.com/ruby/timeout/pull/30)

throw/catch is used for non-local control flow, not for exceptional situations.
For exceptional situations, raise should be used instead.  A timeout is an
exceptional situation, so it should use raise, not throw/catch.

Timeout's implementation that uses throw/catch internally causes serious problems.
Consider the following code:

```ruby
def handle_exceptions
  yield
rescue Exception => exc
  handle_error # e.g. ROLLBACK for databases
  raise
ensure
  handle_exit unless exc # e.g. COMMIT for databases
end

Timeout.timeout(1) do
  handle_exceptions do
    do_something
  end
end
```

This kind of design ensures that all exceptions are handled as errors, and
ensures that all exits (normal exit, early return, throw/catch) are not
handled as errors.  With Timeout's throw/catch implementation, this type of
code does not work, since a timeout triggers the normal exit path.

See https://github.com/rails/rails/pull/29333 for an example of the damage
Timeout's design has caused the Rails ecosystem.

This switches Timeout.timeout to use raise/rescue internally.  It adds a
Timeout::ExitException subclass of exception for the internal raise/rescue,
which Timeout.timeout will convert to Timeout::Error for backwards
compatibility.  Timeout::Error remains a subclass of RuntimeError.

This is how timeout used to work in Ruby 2.0.  It was changed in Ruby 2.1,
after discussion in [Bug #8730] (commit
https://github.com/ruby/timeout/commit/238c003c921e in the timeout repository). I
think the change from using raise/rescue to using throw/catch has caused
significant harm to the Ruby ecosystem at large, and reverting it is
the most sensible choice.

From the translation of [Bug #8730], it appears the issue was that
someone could rescue Exception and not reraise the exception, causing
timeout errors to be swallowed.  However, such code is broken anyway.
Using throw/catch causes far worse problems, because then it becomes
impossible to differentiate between normal control flow and exceptional
control flow.

Also related to this is [Bug #11344], which changed how
Thread.handle_interrupt interacted with Timeout.

https://github.com/ruby/timeout/commit/f16545abe6

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-06-22 18:24:46 +00:00
ima1zumi 218a8d8ef1 [ruby/reline] Remove unused method
(https://github.com/ruby/reline/pull/557)

`get_mbchar_byte_size_by_first_char` isn't used in Reline.
Also, this method implements the same functionality as `String#bytesize` and is unnecessary.
2023-06-22 17:07:23 +00:00
Jeremy Evans de51a4a13e [ruby/ipaddr] Consider IPv4-mapped IPv6 addresses private if IPv4 address is private
Fixes [Bug #19479]

https://github.com/ruby/ipaddr/commit/7faa0768d3
2023-06-22 16:40:46 +00:00
Jemma Issroff cc7f765f2c [Feature #19741] Sync all files in yarp
This commit is the initial sync of all files from ruby/yarp
into ruby/ruby. Notably, it does the following:

* Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp
* Sync all ruby/yarp/src/ files to ruby/ruby/yarp/
* Sync all ruby/yarp/test/ files to ruby/ruby/test/yarp
2023-06-21 11:25:39 -07:00
tomoya ishida e25403d0d9 [ruby/irb] Improve indentation: bugfix, heredoc, embdoc, strings
(https://github.com/ruby/irb/pull/515)

* Implement heredoc embdoc and string indentation with bugfix

* Fix test_ruby_lex's indentation value

* Add embdoc indent test

* Add workaround for lines==[nil] passed to auto_indent when exit IRB with CTRL+d
2023-06-20 15:13:43 +00:00
Yuta Kusuno 9ce6e09637 [ruby/reline] Omit constant under Struct
(https://github.com/ruby/reline/pull/554)

https://github.com/ruby/reline/commit/8761a11fa5
2023-06-20 14:02:58 +00:00
Hiroshi SHIBATA 1edbaa850f Merge rubygems/rubygems HEAD
Pick from 880dd95996
2023-06-20 13:35:13 +09:00
tomoya ishida b8cd79c82f [ruby/irb] Add missing token that ignored by ripper
(https://github.com/ruby/irb/pull/608)

https://github.com/ruby/irb/commit/1cd3b45402
2023-06-19 10:38:24 +00:00
Hiroshi SHIBATA 5bc1b56c14 [rubygems/rubygems] Auto-correct Performance/FlatMap
https://github.com/rubygems/rubygems/commit/b696edcd73
2023-06-16 04:10:38 +00:00
tomoya ishida 364a6d56d7 [ruby/irb] Rewrite RubyLex to fix some bugs and make it possible to
add new features easily
(https://github.com/ruby/irb/pull/500)

* Add nesting level parser for multiple use (indent, prompt, termination check)

* Rewrite RubyLex using NestingParser

* Add nesting parser tests, fix some existing tests

* Add description comment, rename method to NestingParser

* Add comments and tweak code to RubyLex

* Update NestingParser test

* Extract list of ltype tokens to constants
2023-06-15 15:39:58 +00:00
Petrik 0c55ef1150 [ruby/rdoc] Use flat_map for better performance
https://github.com/ruby/rdoc/commit/76192a280d
2023-06-14 23:47:25 +00:00
Hiroshi SHIBATA c2f4b41480
Merge rubygems/rubygems HEAD
Pick from 7a7b234721
2023-06-15 07:02:03 +09:00
Hiroshi SHIBATA 827d66266b [rubygems/rubygems] auto-correct Style/YodaCondition
https://github.com/rubygems/rubygems/commit/6d9e8025dc
2023-06-15 07:01:28 +09:00
David Rodríguez 3e7f5b02ae [rubygems/rubygems] Improve error message in frozen mode edge case
When a top level dependency is missing from the lockfile, and we're in
frozen mode, we should also print a "frozen error".

https://github.com/rubygems/rubygems/commit/3e82b835e3
2023-06-15 07:01:25 +09:00
David Rodríguez e86f4c581b [rubygems/rubygems] Improve frozen mode error message
This error message is also printed when using `bundler/setup` in frozen
model, so we're not necessarily installing any gems when it happens.

This new message play nicer with all situations.

https://github.com/rubygems/rubygems/commit/6874bbacce
2023-06-15 07:01:25 +09:00
David Rodríguez 23ecaab8dd [rubygems/rubygems] Use "frozen" rather than "deployment" in error message
I think it communicates better what's going on.

https://github.com/rubygems/rubygems/commit/07a25767a4
2023-06-15 07:01:24 +09:00
David Rodríguez 2ff9b7b93d [rubygems/rubygems] Show missing spec in lockfile incomplete error message
https://github.com/rubygems/rubygems/commit/b86caaa3d5
2023-06-15 07:01:24 +09:00
David Rodríguez 21238f38a8 [rubygems/rubygems] Extract `Definition#no_resolved_needed?`
https://github.com/rubygems/rubygems/commit/1ff8626571
2023-06-15 07:01:23 +09:00
David Rodríguez 4f1b1817a8 [rubygems/rubygems] There should always be a reason
https://github.com/rubygems/rubygems/commit/4180008c2d
2023-06-15 07:01:23 +09:00
David Rodríguez c12168185e [rubygems/rubygems] Show relative path to Gemfile in error message
For conciseness and consistency with printing the relative path to the
lockfile just before.

https://github.com/rubygems/rubygems/commit/74cf6aea7c
2023-06-15 07:01:22 +09:00
David Rodríguez e7749c4dea [rubygems/rubygems] Remove weird line breaks in the middle of error message
https://github.com/rubygems/rubygems/commit/22b8caf42f
2023-06-15 07:01:21 +09:00
David Rodríguez 90c60e8138 [rubygems/rubygems] Simplify checking Gemfile vs lockfile sources
https://github.com/rubygems/rubygems/commit/251e80aec6
2023-06-15 07:01:21 +09:00
David Rodríguez 96e3f31c1e [rubygems/rubygems] Make frozen mode spec also pass on Bundler 3
https://github.com/rubygems/rubygems/commit/ad52f840f2
2023-06-15 07:01:20 +09:00
Hiroshi SHIBATA 6e93320c1b
Update RDoc::RD parsers generated by racc-1.7.1 2023-06-14 12:56:34 +09:00
tomoya ishida 5d91be7c1f [ruby/irb] Use symbol.inspect instead of ":"+symbol.id2name to avoid
completion candidates including newline characters
(https://github.com/ruby/irb/pull/539)

https://github.com/ruby/irb/commit/aaf0c46645
2023-06-13 10:46:38 +00:00
Samuel Williams 27b07776c9 [rubygems/rubygems] Autoload shellwords when it's needed.
https://github.com/rubygems/rubygems/commit/e916ccb2d9
2023-06-13 09:32:47 +00:00
Nobuyoshi Nakada 6d734a8975 [ruby/uri] Fix RFC3986 regexps
https://github.com/ruby/uri/commit/8e38592241
2023-06-13 05:57:17 +00:00
Nobuyoshi Nakada 57c5b0a980 [ruby/uri] Refactor RFC3986 regexps to make more readable
https://github.com/ruby/uri/commit/3dfa19e920
2023-06-13 03:25:45 +00:00
Stan Lo e1ccb2838b [ruby/irb] Use `Kernel.warn` to print command alias warning
(https://github.com/ruby/irb/pull/601)

This aligns with other warnings in irb and properly channel the message
to stderr.
2023-06-10 15:01:46 +00:00
Stan Lo a41e088604 [ruby/irb] Remove the unused fork command definition
(https://github.com/ruby/irb/pull/600)

https://github.com/ruby/irb/commit/b039b89343
2023-06-10 12:51:38 +00:00
Gareth Adams eaf11d3dd4 [rubygems/rubygems] Stop publishing Gemfile in default gem template
Similarly to how the other ignored files are intended for local
development and not for production, the Gemfile and Gemfile.lock files
for a gem only relate to local development and aren't useful to people
installing the gem.

https://github.com/rubygems/rubygems/commit/59049c04be
2023-06-08 15:20:05 +00:00
Hiroshi SHIBATA d1775aa388 Try to promote racc as bundled gems 2023-06-08 17:25:38 +09:00
Hiroshi SHIBATA 7ef1a2387e
Re-generate RDoc::RD parsers with racc-1.7.0 2023-06-08 10:20:32 +09:00
Hiroshi SHIBATA 0f2ebfee85 [ruby/racc] Bump up v1.7.0
https://github.com/ruby/racc/commit/0feca00301
2023-06-08 01:09:05 +00:00
Hiroshi SHIBATA 8206a82140
Update parser-text.rb with https://github.com/ruby/racc/pull/218 2023-06-08 09:59:44 +09:00
Peter Zhu 7577c101ed
Unify length field for embedded and heap strings (#7908)
* Unify length field for embedded and heap strings

The length field is of the same type and position in RString for both
embedded and heap allocated strings, so we can unify it.

* Remove RSTRING_EMBED_LEN
2023-06-06 10:19:20 -04:00
David Rodríguez 79e8d91410 [rubygems/rubygems] Delay cache access in `LockfileParser`
It's the only part that needs "root folder resultion" to figure out the
folder for the cache, but it's only needed for some things, so run that
logic lazily when needed.

https://github.com/rubygems/rubygems/commit/c7b9eae0bc
2023-06-06 10:52:57 +09:00
David Rodríguez 03246719cc [rubygems/rubygems] Fix `path` vs `deployment` precedence when path set through ENV
The `deployment` setting sets `path` to `vendor/bundle` implicitly, but
that should only apply if `path` is not set explicitly, at any level.

https://github.com/rubygems/rubygems/commit/3552c064c1
2023-06-06 10:52:57 +09:00
David Rodríguez 1f9e66836b [rubygems/rubygems] Fix inline mode with multiple sources
If we're in inline mode, Bundler first resolves using only local gems,
and if some gems are missing, then it re-resolves using remote gems.
However, "source resolution" from the initial "local" try was being
memoized, resulting in Bundler not looking for some gems remotely in the
second resolution.

This commit forces a proper re-resolve in this case.

https://github.com/rubygems/rubygems/commit/fdc631075e
2023-06-06 10:52:53 +09:00
Stan Lo 45ff2f4a89 [ruby/irb] Refactor ExtendCommand::Nop
(https://github.com/ruby/irb/pull/598)

* Rename conf to irb_context

* Drop Nop#irb method because it's only used by irb/ext/loader.rb

We don't need to expose this method to all command classes, especially
when it's just an alias of `irb_context.irb`.
2023-06-05 19:12:16 +00:00
Stan Lo 273b38475e [ruby/irb] Simplify irb_info command
(https://github.com/ruby/irb/pull/597)

https://github.com/ruby/irb/commit/0a0409c52b
2023-06-05 19:02:43 +00:00
ima1zumi 76ee4edb97 [ruby/irb] Fixed string escaping omissions
(https://github.com/ruby/irb/pull/599)

I received a `RegexpError` when I typed `::Array[`.
::Array[/Users/mi/ghq/github.com/ruby/irb/lib/irb/completion.rb:236:in `retrieve_completion_data': premature end of char-class: /^Array[/ (RegexpError)
2023-06-05 18:34:10 +00:00
Daniel Pepper 542c70aab7 [ruby/singleton] Simplify implementation of `Singleton#instance`.
(https://github.com/ruby/singleton/pull/9)

- Add more tests to cover rails' usage.
2023-06-05 04:29:37 +00:00
Hiroshi SHIBATA 3a4302c742 [ruby/singleton] Revert "Simplify the implementation
(https://github.com/ruby/singleton/pull/7)"

This reverts commit https://github.com/ruby/singleton/commit/545b6b61a40d.

  This change break Rails CI: https://bugs.ruby-lang.org/issues/19711

https://github.com/ruby/singleton/commit/911531d508
2023-06-05 01:10:26 +00:00
Stan Lo 4275a8098e [ruby/irb] Bump version to 1.7.0
(https://github.com/ruby/irb/pull/596)

https://github.com/ruby/irb/commit/c2e7002867
2023-06-04 15:24:30 +00:00
Stan Lo e6bd1852fb [ruby/reline] Bump version to 0.3.5
(https://github.com/ruby/reline/pull/548)

https://github.com/ruby/reline/commit/4330a52572
2023-06-03 08:28:02 +00:00
Vinicius Stock a4d92475f6 [ruby/rdoc] Auto-correct trailing new lines
https://github.com/ruby/rdoc/commit/4b68c0728a
2023-06-03 01:42:29 +00:00
Daniel Pepper bebd05fb51 [ruby/singleton] Simplify the implementation
(https://github.com/ruby/singleton/pull/7)

Remove `__init__` and move logic to `included`.
2023-06-03 00:35:18 +00:00
Nobuyoshi Nakada e38fb050fa [ruby/reline] Remove unnecessary conditions for
`Fiddle::TYPE_VARIADIC`
(https://github.com/ruby/reline/pull/547)

https://github.com/ruby/reline/commit/71ba3a9432
2023-06-02 12:18:06 +00:00
Nobuyoshi Nakada 729b92ea46 [ruby/uri] Drop support for 2.4
https://github.com/ruby/uri/commit/21baf2ba16
2023-06-02 05:27:06 +00:00
Hiroshi SHIBATA d8f333491e [ruby/syntax_suggest] Use hard-coded filename for executables.
It's hard to handle between ruby/syntax_suggest and ruby/ruby at gemspec.

https://github.com/ruby/syntax_suggest/commit/0ee7496668
2023-06-01 14:46:52 +09:00
Hiroshi SHIBATA 4bbeed6134 Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285 2023-05-30 21:50:07 +09:00
Jeremy Evans ec9364e500 [ruby/racc] Remove ErrorSymbolValue reference
I cannot find where this is defined.  I'm guessing neither this
nor the else branch is ever hit.  I only found out when testing
VM changes, which had a bug that exposed this.

https://github.com/ruby/racc/commit/8983d0c134
2023-05-30 01:43:48 +00:00
Benoit Daloze f61bd3ca80 [ruby/cgi] Add TruffleRuby support and add it in CI
https://github.com/ruby/cgi/commit/1240fec9c9
2023-05-29 19:33:38 +00:00
Jun Aruga 57459b83a9
mkmf: Add the extra option `--with-verbose` to enable verbose mode. (#7863)
This commit is to add an extra option to enable verbose mode (V=1) in the
generated `Makefile` at runtime of the Ruby to print compiler command lines by
the commands below when building native extensions. It's possible to enable the
verbose mode by setting the environment variable `MAKEFLAGS="V=1"`[1]
implemented in GNU make. However, I wanted to make a consistent user-interface
not depending on the specific make's implementation.

```
$ ruby /path/to/extconf.rb -- --with-verbose
```

You can also add the extra option via rake-compiler gem.

```
$ rake compiler -- --with-verbose
```

If the extra option is not given, the value of the
`RbConfig::CONFIG["MKMF_VERBOSE"]` enabled by the configure option below is
used.

```
$ ./configure --enable-mkmf-verbose
```

For the unit tests, updated the following files.

* The `test/mkmf/test_configuration.rb` was created to test the cases with the
  `configuration` method and this implementation.
* Updated the `TestMkmf#assert_separately` to set the extra
  arguments in `test/mkmf/base.rb`. Updated tests using the `assert_separately`.
* Added tests for `MakeMakefile#with_config` in the `test/mkmf/test_config.rb`.

[1] https://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html

Fixes [Bug #19695]

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-05-29 10:09:32 +02:00
tomoya ishida d5ef373b11 [ruby/irb] Set maximum document dialog height by
preferred_dialog_height provided by Reline
(https://github.com/ruby/irb/pull/591)

https://github.com/ruby/irb/commit/df6907aca9
2023-05-28 09:20:18 +00:00
tomoya ishida cf0b9e0db0 [ruby/reline] Fix scrolldown condition in dialog rendering
(https://github.com/ruby/reline/pull/541)

https://github.com/ruby/reline/commit/ad6faada3f
2023-05-27 15:07:29 +00:00
tomoya ishida 5d137a7f77 [ruby/reline] Use appropriate dialog height and reduce screen pushup
problem
(https://github.com/ruby/reline/pull/542)

* Provide preferred_dialog_height for dialog positioning

* Fix rendering test
2023-05-27 14:48:50 +00:00
Masafumi Koba 94e5ecbbdd [ruby/rdoc] Improve `<summary>` CSS on sidebar
- Use a smaller font size for the toggle symbol. (Currently, it seems a little too large)
- Use the child combinator (`>`) to unify selectors.
- Use `margin-left` instead of whitespace within the `content` property.
- Use `::` instead of outdated `:` for the pseudo-element symbol.
  (See https://developer.mozilla.org/en-US/docs/Web/CSS/::before)

https://github.com/ruby/rdoc/commit/61ce0a7d75
2023-05-26 16:26:46 +00:00
Masafumi Koba 54b7ce0bff [ruby/rdoc] Improve layout CSS
- Use the `grid` property for the page layout.
  - https://caniuse.com/css-grid
- Adjust the `<main>` margin.
- Make the sidebar responsive and resizable.
  - https://caniuse.com/css-math-functions
  - https://caniuse.com/css-resize

Note all modern browsers support the new CSS properties and functions used by this change.

https://github.com/ruby/rdoc/commit/2db5097c41
2023-05-26 16:24:57 +00:00
Sutou Kouhei d83f32c34b [rubygems/rubygems] Load plugin immediately
We can install RubyGems plugin by "gem install XXX". The installed
plugin is used from the NEXT "gem ...".

For example, "gem install gem-src kaminari" doesn't use gem-src plugin
for kaminari. "gem install gem-src && gem install kaminari" uses
gem-src plugin for kaminari.

How about loading a plugin immediately when the plugin is installed?
If this proposal is implemented, "gem install gem-src kaminari" works
like "gem install gem-src && gem install kaminari".

https://github.com/rubygems/rubygems/commit/4917d96f4c
2023-05-25 21:51:15 +00:00
Hiroshi SHIBATA 5ade6be777
Fixup 5bfb317a93 2023-05-25 16:09:29 +09:00
Hiroshi SHIBATA 5bfb317a93 [ruby/benchmark] Don't use version.rb
https://github.com/ruby/benchmark/commit/6d51b10500
2023-05-25 07:08:44 +00:00
Hiroshi SHIBATA d1237bc3a4
Move gemspec files to top of lib directory.
They have version.rb files with same directory.
  But version.rb have been removed at https://github.com/ruby/ruby/pull/3375
  There is no reason to locate under the library name of directory.
2023-05-25 15:47:48 +09:00
Sutou Kouhei 88876f02c1 [ruby/csv] All Enumerable based methods consume the same lines with other methods
This may have a performance penalty. We should benchmark this.

GitHub: fix https://github.com/ruby/csv/pull/260

Reported by Lhoussaine Ghallou. Thanks!!!

https://github.com/ruby/csv/commit/acc05116c5
2023-05-25 01:44:17 +09:00
Sutou Kouhei 73c56e06c4 [ruby/csv] CSV#read consumes the same lines with other methods like CSV#shift
GitHub: fix https://github.com/ruby/csv/pull/258

Reported by Lhoussaine Ghallou. Thanks!!!

https://github.com/ruby/csv/commit/71e6d24e28
2023-05-25 01:44:17 +09:00
Mau Magnaguagno a0709d0aae [ruby/csv] Remove no longer required refinements
(https://github.com/ruby/csv/pull/250)

Since PR #159, the minimum Ruby version is 2.5.0, a version which no
longer requires refinements for String#delete_suffix?, String#match? and
Regexp#match?.
2023-05-25 01:44:17 +09:00
Jenny Shen 061e01ee50 [rubygems/rubygems] Remove forward slash in key regardless if it contains __
https://github.com/rubygems/rubygems/commit/33a02eec00
2023-05-23 18:37:09 +00:00
Jenny Shen e854b050cc [rubygems/rubygems] Modify invalid key check to accept keys with colons
https://github.com/rubygems/rubygems/commit/413033198b

Co-authored-by: Eric Herscovich <eric.herscovich@shopify.com>
2023-05-23 18:37:08 +00:00
TSUYUSATO Kitsune 92d6c9a7b1 [ruby/irb] Allow `show_source` for private methods
(https://github.com/ruby/irb/pull/589)

* Allow `show_source` for private methods

Fix https://github.com/ruby/irb/pull/577

* Pend tests on TruffleRuby

It seems `eval(..., __LINE__ + 1)` does not work.
Other similar tests are also pended on TruffleRuby, so I think it
is acceptable.

* Use `private_method_defined?` instead of `defined?`
2023-05-23 16:16:37 +00:00
Hiroshi SHIBATA a7d7032100
Manually merge syntax_suggest-1.1.0 2023-05-23 10:05:47 +09:00
schneems c638ffa700
[ruby/syntax_suggest] Fix
https://github.com/ruby/syntax_suggest/pull/187 Handle if/else with
empty/comment
line

Reported in #187 this code:

```
class Foo
  def foo
    if cond?
      foo
    else
      # comment
    end
  end

  # ...

  def bar
    if @recv
    end_is_missing_here
  end
end
```

Triggers an incorrect suggestion:

```
Unmatched keyword, missing `end' ?
   1  class Foo
   2    def foo
>  3      if cond?
>  5      else
   8    end
  16  end
```

Part of the issue is that while scanning we're using newlines to determine when to stop and pause. This is useful for determining logically smaller chunks to evaluate but in this case it causes us to pause before grabbing the "end" that is right below the newline. This problem is similar to https://github.com/ruby/syntax_suggest/pull/179.

However in the case of expanding same indentation "neighbors" I want to always grab all empty values at the end of the scan. I don't want to do that when changing indentation levels as it affects scan results.

There may be some way to normalize this behavior between the two, but the tests really don't like that change.

To fix this issue for expanding against different indentation I needed a way to first try and grab any additional newlines with the ability to rollback that guess. In #192 I experimented with decoupling scanning from the AroundBlockScan logic. It also added the ability to take a snapshot of the current scanner and rollback to prior changes.

With this ability in place now we:

- Grab extra empties before looking at the above/below line for the matching keyword/end statement
- If there's a match, grab it
- If there's no match, discard the newlines we picked up in the evaluation

That solves the issue.

https://github.com/ruby/syntax_suggest/commit/513646b912
2023-05-23 10:05:47 +09:00
schneems aaf815c626
[ruby/syntax_suggest] Refactor Scanner logic out of AroundBlockScan introduce history
AroundBlockScan started as a utility class that was meant to be used as a DSL for scanning and making new blocks. As logic got added to this class it became hard to reason about what exactly is being mutated when. I pulled the scanning logic out into it's own class which gives us a clean separation of concerns. This allowed me to remove a lot of accessors that aren't core to the logic provided by AroundBlockScan.

In addition to this refactor the ScanHistory class can snapshot a scan. This allows us to be more aggressive with scans in the future as we can now snapshot and rollback if it didn't turn out the way we wanted.

The change comes with a minor perf impact:

before: 5.092678   0.104299   5.196977 (  5.226494)
after: 5.128536   0.099871   5.228407 (  5.249542)

This represents a 0.996x change in speed (where 1x would be no change and 2x would be twice as fast). This is a 0.38% decrease in performance which is negligible. It's likely coming from the extra blocks being created while scanning. This is negligible and if the history feature works well we might be able to make better block decisions which is means fewer calls to ripper which is the biggest bottleneck.

While this doesn't fix https://github.com/ruby/syntax_suggest/issues/187 it's a good intermediate step that will hopefully make working on that issue easier.

https://github.com/ruby/syntax_suggest/commit/ad8487d8aa
2023-05-23 10:05:47 +09:00
schneems b8bf0a5272
[ruby/syntax_suggest] Fix warning message
The env var DEBUG does not work to produce detailed output. It is SYNTAX_SUGGEST_DEBUG. It was changed as part of the dead_end to syntax_suggest migration for Ruby 3.2

https://github.com/ruby/syntax_suggest/commit/c41da7aab7
2023-05-23 10:05:47 +09:00
ima1zumi 8db13c179e [ruby/reline] Bump version to 0.3.4
(https://github.com/ruby/reline/pull/538)

https://github.com/ruby/reline/commit/1fb0753bc1
2023-05-20 09:31:43 +00:00
tomoya ishida e8c9f727e8 [ruby/irb] Simplify each_top_level_statement
(https://github.com/ruby/irb/pull/576)

* Simplify each_top_level_statement, reduce instance vars

* Update lib/irb/ruby-lex.rb

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

* Remove unused ltype from TestRubyLex#check_state response

* Remove unnecessary const path of TerminateLineInput

* Combine duplicated code state check into method

---------

https://github.com/ruby/irb/commit/172453cec4

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-05-19 13:48:08 +00:00
Adam Daniels b54b388f2a [ruby/irb] Display mod key as `Option` on Darwin platforms
(https://github.com/ruby/irb/pull/584)

Check RUBY_PLATFORM for `darwin` and modify the mod key from `Alt` to
`Option`.
2023-05-19 01:33:32 +00:00
Stan Lo cfb7997353 [ruby/irb] Refactor RubyLex's input/io methods
(https://github.com/ruby/irb/pull/583)

1. Make `RubyLex#set_input` simply assign the input block. This matches
   the behavior of `RubyLex#set_prompt`.
2. Merge `RubyLex#set_input`'s IO configuration logic with `#set_auto_indent`
   into `#configure_io`.
2023-05-18 19:00:33 +00:00
Stan Lo b695f58d52 [ruby/irb] Print deprecation warning for `help` command
(https://github.com/ruby/irb/pull/567)

* Give show_doc its own command class

* Print deprecation warning for `help` command
2023-05-18 03:28:31 +00:00
Hiroshi SHIBATA 5f411b9b3e [rubygems/rubygems] Bump up thor-1.2.2
https://github.com/rubygems/rubygems/commit/d9a003b4e7
2023-05-13 02:21:33 +00:00
Hiroshi SHIBATA 0ef6e718d9
Merge https://github.com/rubygems/rubygems/pull/6655 manually. 2023-05-10 15:02:29 +09:00
Samuel Giddins 9ed189e9aa
Update SPDX license list 2023-05-10 14:58:55 +09:00
Takumasa Ochi 5831f7c831 [rubygems/rubygems] Simplify code by Gem::Specification#runtime_dependencies
https://github.com/rubygems/rubygems/commit/324139af8f
2023-05-08 08:56:22 +00:00
tomoya ishida 5eca327fc5 [ruby/reline] Fix dialog corrupts rendering by pushing up input line
too much
(https://github.com/ruby/reline/pull/524)

* Do not render dialog where it overflows screen

* Dialog rendering should Scroll down only when needed

* Refactor screen_y_range calculation

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

---------

https://github.com/ruby/reline/commit/bc0e3d1310

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-05-07 13:18:13 +00:00
zzak 8b2884c0b5 [ruby/rdoc] Isolate root dir if specified
This ensures only files from the root directory are chosen, in order to allow a clean build from outside the source directory.

https://github.com/ruby/rdoc/commit/f3b389aa9e
2023-05-06 07:39:24 +00:00
Nobuyoshi Nakada 40438fc4d3 [ruby/rdoc] Drop the support for 2.5 or earlier because of CVE-2021-31799
https://github.com/ruby/rdoc/commit/26136138aa
2023-05-05 14:01:50 +00:00
Nobuyoshi Nakada cfa6a892d0
Redirect to `IO::NULL` for the portability 2023-05-05 18:52:36 +09:00
Nobuyoshi Nakada 32cc6301b3 [ruby/rdoc] [DOC] stop documenting fallback `MatchData#match_length`
Also empty document of `Object`.

https://github.com/ruby/rdoc/commit/ce32a3102b
2023-05-02 17:06:36 +00:00
Nobuyoshi Nakada e47aa27dc7 [ruby/rdoc] Section may not have `label`
https://github.com/ruby/rdoc/commit/945f0cb3e9
2023-05-02 05:42:37 +00:00
Nobuyoshi Nakada 3833d0fee6 [ruby/rdoc] Fix references to nested label in table_of_contents
Fixes https://github.com/ruby/rdoc/pull/1000

https://github.com/ruby/rdoc/commit/291e2b7e8b
2023-05-02 04:19:46 +00:00
tomoya ishida 13dfbcf7bf [ruby/reline] Rewrite dialog rendering
(https://github.com/ruby/reline/pull/492)

* Rewrite dialog rendering

* Fix failing test of dialog with small screen

* Add multiple-dialog rendering test

* Add description comments for each part of render_dialog_changes
2023-05-01 12:20:20 +00:00
Nobuyoshi Nakada dd5ba1b725
Update generate_spdx_license_list.rb
- Follow up RegexpLiteral at 9264d834215aa7ce14b0273032a7686c20141db9.
- Split the code to be generated so that `REGEXP` does not need
  escapes.
- Use `REGEXP.match?` since support for Ruby 2.3 or earlier has been
  dropped.
2023-05-01 17:40:02 +09:00
Nobuyoshi Nakada c2871161b4 [ruby/rdoc] Fix polynominal backtracking
Fix https://github.com/ruby/rdoc/pull/995

https://github.com/ruby/rdoc/commit/1311ca8c50
2023-04-29 16:55:37 +00:00
Nobuyoshi Nakada 85a9fd1902 [ruby/rdoc] Fix polynominal backtracking
Fix https://github.com/ruby/rdoc/pull/995

https://github.com/ruby/rdoc/commit/adfa7db5b9
2023-04-29 16:55:36 +00:00
Stan Lo e9930b51b2 [ruby/irb] Retire magic-file.rb
(https://github.com/ruby/irb/pull/574)

`MagicFile` was introduced around v0.9.6, which was like 14~15 years ago.
It was needed because back then we needed to read a file's magic comment
to determine the encoding of it, and read it with that encoding.

Commit: 3ee79e89

But now we expect files to be encoded in UTF-8 and don't specify encoding
through magic comments anymore, `MagicFile` can be retired.
2023-04-28 17:20:20 +00:00
Takashi Kokubun d4dc149c3c Update an Intel SDM link [ci skip] 2023-04-28 10:09:52 -07:00
Nobuyoshi Nakada 7ba37cb7aa [ruby/resolv] Prefer `Array#concat` over `#+=` on `Array`
Fix https://bugs.ruby-lang.org/issues/19621

https://github.com/ruby/resolv/commit/7faaa78847
2023-04-28 11:29:02 +00:00
Stan Lo 5cd4f35da6 [ruby/irb] Simplify Locale#load
(https://github.com/ruby/irb/pull/571)

* Simplify Locale#load

Instead of loading file content with `MagicFile` and then evaluting it,
we can just use `Kernel.load` to load the file.

* Remove unused optional argument

* Remove unused Locale#require and #toplevel_load
2023-04-27 15:42:21 +00:00
Stan Lo a58cae77f7 [ruby/irb] Stop using MagicFile for printing help messages
(https://github.com/ruby/irb/pull/573)

`MagicFile` was introduced around v0.9.6, which was like 14~15 years ago.
It was needed because back then we needed to read a file's magic comment
to determine the encoding of it, and read it with that encoding.

Commit: 3ee79e89ad

But now both EN and JA's help-message file are UTF-8 and have removed the
encoding comment, we don't need to open them with `MagicFile` anymore.
2023-04-27 11:07:05 +00:00
Takashi Kokubun cbfb5fbb25 RJIT: Fix unspecified_bits with locals 2023-04-26 18:12:53 -07:00