Commit graph

14675 commits

Author SHA1 Message Date
tomoya ishida
8fb430c1da [ruby/irb] Restore MAIN_CONTEXT correctly
(https://github.com/ruby/irb/pull/937)

c41f460a70
2024-04-30 10:29:38 +00:00
Mari Imaizumi
dbb1ba88eb [ruby/reline] Bump version to 0.5.4
(https://github.com/ruby/reline/pull/691)

3f27286a5e
2024-04-29 13:35:59 +00:00
tomoya ishida
814d4b5e2c [ruby/reline] Input with eof and no newline bugfix
(https://github.com/ruby/reline/pull/671)

0d66c335a1
2024-04-29 13:23:03 +00:00
tomoya ishida
ae701031f5 [ruby/reline] Completely support full-width characters in
differential rendering
(https://github.com/ruby/reline/pull/654)

* Add a cut variation of Reline::Unicode.take_range method take_mbchar_range

* Consider fullwidth take_range in differential rendering

29714df09f
2024-04-29 12:08:59 +00:00
Mari Imaizumi
018c5717e5 [ruby/reline] Handle mode condition in inputrc
(https://github.com/ruby/reline/pull/687)

bed5fb3d77
2024-04-29 12:05:36 +00:00
David Rodriguez
435f449b4e [rubygems/rubygems] Make sure to force latest resolvable version explicitly
To make sure we can always update to the latest resolvable version for
each gem explicitly requested for update, we first run a full update,
and then add explicit exact requirements to the resolved versions. This
may lead into conflicts, but our resolver already automatically parses
those and unlocks additional gems to fix them.

01c0bf34f0
2024-04-29 10:29:29 +00:00
David Rodríguez
491195af02 [rubygems/rubygems] Keep track of gems requested for update explicitly
ea43e4c6d7
2024-04-29 10:29:28 +00:00
David Rodriguez
83933f921b [rubygems/rubygems] No need to reset version promoter here
Since resolution options don't change.

5c5aa38c06
2024-04-29 10:29:28 +00:00
David Rodríguez
53571de8e9 [rubygems/rubygems] Fix circular require warning
241d0aafcd
2024-04-29 09:04:33 +00:00
David Rodríguez
d6cb62a88f [rubygems/rubygems] Show better error when installed gemspecs are unreadable
924f87c8a9
2024-04-29 08:57:35 +00:00
David Rodríguez
68a1867f53 [rubygems/rubygems] Fix issue with bundle update with an out of sync lockfile
An old platform related bug fix made some existing lockfiles no longer
work because they included invalid platforms. So to make it backwards
compatible, code was added to remove invalid platforms from the lockfile
before resolution. This is skipped though when Gemfile has changed
dependencies because in that case we will be re-resolving anyways.
However, in the `bundle update` case, the detection of "dependencies
have changed" was not actually working making Bundler remove all
platforms and not be able to resolve.

6452adfd62
2024-04-29 08:56:55 +00:00
Andy Waite
6203307f16 [rubygems/rubygems] Address PR feedback
62be097a32
2024-04-29 08:42:07 +00:00
Andy Waite
2a683f3f7d [rubygems/rubygems] Clarify bundle check behaviour in docs
c438c6db2e
2024-04-29 08:42:07 +00:00
Kevin Newton
3872e54039 [ruby/prism] Bump to v0.27.0
c9edeef91a
2024-04-26 17:01:03 -04:00
Kevin Newton
9688093124 [ruby/prism] Location#slice_lines, Node#slice_lines
9b61f6fdb3
2024-04-26 19:05:32 +00:00
Stan Lo
148518baa0 [ruby/irb] Suppress command return values
(https://github.com/ruby/irb/pull/934)

Since commands can't be chained with methods, their return values are
not intended to be used. But if IRB keeps storing command return values
as the last value, and print them, users may rely on such implicit
behaviour.

So to avoid such confusion, this commit suppresses command's
return values. It also updates some commands that currently rely on
this implicit behaviour.

fa96bea76f
2024-04-26 17:52:12 +00:00
Stan Lo
25a8b76c76 [ruby/irb] Command registration should take both strings and symbols
as names
(https://github.com/ruby/irb/pull/932)

This will save users some heads scratching when they try to register a
command with a string name and found that it doesn't work.

I also rewrote converted custom command tests into integration tests to
make test setup/cleanup easier.

a91a212dbe
2024-04-26 12:12:31 +00:00
Josh Nichols
6f4f360fc4 [rubygems/rubygems] Add auto_install support to require "bundler/setup"
We have some places that already use `bundle config auto_install true`,
ie:

7a144f3374/bundler/lib/bundler/cli.rb (L11)

This applies the same logic (copy and pasted) to happen when you
`require "bundler/setup"`.

bb3c922341
2024-04-25 18:46:05 +00:00
Kevin Newton
b6489e9f62 [ruby/prism] Remove need for Natalie patches
7fc7e13476
2024-04-25 18:00:09 +00:00
tomoya ishida
4ff249363d [ruby/reline] Fix inputrc nested $if $else $endif bug
(https://github.com/ruby/reline/pull/689)

0d8aea26ec
2024-04-25 16:12:50 +00:00
David Rodriguez
5d2fb5d76b [rubygems/rubygems] Don't upcase Windows ENV when backing it up
I apparently did that to fix some issue with case insensitivity but I
didn't add a spec, and I think not upcasing should not cause issues.

1b6f23275a
2024-04-25 10:35:47 +00:00
David Rodriguez
2871376510 [rubygems/rubygems] Remove unnecessary workaround
All supported rubies include the fix.

9d74b699f5
2024-04-25 10:35:46 +00:00
David Rodríguez
5577f138b4 [rubygems/rubygems] Properly resolve aliases when bundle help is run
5d9bf03c59
2024-04-25 10:35:02 +00:00
Eugene Kenny
67dd9af17e [Bug #20450] Remove rubyarchdir from bootsnap paths 2024-04-25 13:29:28 +09:00
Stan Lo
4349c7909f [ruby/irb] Memoize helper method instances with Singleton module
(https://github.com/ruby/irb/pull/931)

Some helpers, like Rails console's `app`, requires memoization of the
helper's ivars. To support it IRB needs to memoize helper method instances
as well.

a96c7a6668
2024-04-24 18:32:55 +00:00
Kevin Newton
6d9ba1e014 [ruby/prism] Change inspect from recursive to a queue
We would previously cause a stack overflow if we parsed a file that
was too deeply nested when we were calling inspect. Instead, we now
use a queue of commands to do it linearly so we don't.

0f21f5bfe1
2024-04-24 14:16:42 -04:00
tomoya ishida
cf24a0483e [ruby/reline] Long line performance
(https://github.com/ruby/reline/pull/688)

* Improve C-e (ed_move_to_end) performance for long line

* Reline::Unicode.split_by_width optimization for RESET_SGR

0c8d3c827a
2024-04-24 17:33:40 +00:00
Stan Lo
9bba999be7 [ruby/irb] Revert "Memoize helper method instances with Singleton module"
This reverts commit 169a9a2c30.

221b0a4928
2024-04-24 16:01:23 +00:00
Stan Lo
e5ca3d072f [ruby/irb] Memoize helper method instances with Singleton module
Some helpers, like Rails console's `app`, requires memoization of the
helper's ivars. To support it IRB needs to memoize helper method instances
as well.

169a9a2c30
2024-04-24 16:01:02 +00:00
Stan Lo
e11237904c
Sync IRB f9347b1 (#10611) 2024-04-23 21:00:56 +00:00
Kevin Newton
81433fd0f5 [ruby/prism] srange_find should only look on current line
3604aa15e7
2024-04-23 19:29:20 +00:00
Mari Imaizumi
981a8e89a3 [ruby/reline] Bump version to 0.5.3
(https://github.com/ruby/reline/pull/686)

e9d5236c74
2024-04-23 15:27:58 +00:00
tomoya ishida
53a67efc9a [ruby/reline] Separate prompt and input line in rendering
(https://github.com/ruby/reline/pull/652)

* Separate prompt and input line in rendering

Often, only one of prompt and input changes.
Split prompt+input_line to a separate rendering item will improve differential rendering performance.

* Rename method wrapped_prompt_lines to more descriptive name

16d82f1f23
2024-04-23 14:45:22 +00:00
Kevin Newton
dae5900305 [ruby/prism] Fix up rdoc
Fixes https://github.com/ruby/prism/issues/2572

a446580e75
2024-04-23 12:45:17 +00:00
Nobuyoshi Nakada
9b580ee7b6 [rubygems/rubygems] Clear temporary directory
4158034d89
2024-04-21 23:47:47 +00:00
Stan Lo
f16c6ac4fd [ruby/irb] Stop using ExtendCommandBundle internally
(https://github.com/ruby/irb/pull/925)

This module was used to extend both commands and helpers when they're not
separated. Now that they are, and we have a Command module, we should move
command-related logic to the Command module and update related references.

This will make the code easier to understand and refactor in the future.

f74ec97236
2024-04-20 18:55:54 +00:00
tomoya ishida
125e1ed5f7 [ruby/irb] Remove exit command workaround, handle IRB_EXIT in
debug_readline
(https://github.com/ruby/irb/pull/923)

* Remove exit and exti! command workaround when executed outside of IRB

Command was a method. It could be executed outside of IRB.
Workaround for it is no longer needed.

* Handle IRB_EXIT in debug mode

* Add exit and exit! command in rdbg mode

0b5dd6afd0
2024-04-20 07:45:41 +00:00
Kevin Newton
23be6599a2 [ruby/prism] Split parse result based on type
17194e096d
2024-04-19 19:25:32 +00:00
Kevin Newton
c7255ca219 [ruby/prism] Fix up ruby_parser translation for dstr
b0fa4b7cd8
2024-04-19 18:05:07 +00:00
Kevin Newton
2e80ceb6ff [ruby/prism] Fix it parameters for parser translation
2f3feb8d51
2024-04-19 16:29:39 +00:00
Mari Imaizumi
604c29e8a2 [ruby/reline] Implement show-all-if-ambiguous feature
(https://github.com/ruby/reline/pull/683)

0fe4fdc794
2024-04-19 12:08:22 +00:00
Artur
e133d0c7a1 [ruby/time] Document exception thrown by Time.strptime
f9d078082f
2024-04-19 10:32:04 +00:00
Hiroshi SHIBATA
7522d1bffe [rubygems/rubygems] Keep backword compatibility of Bundler.require
f6f79f4c37
2024-04-19 05:18:21 +00:00
Hiroshi SHIBATA
acc326b7c4 [rubygems/rubygems] Removed needless class name
a2f43d3756
2024-04-19 05:18:21 +00:00
Hiroshi SHIBATA
a95b46db06 [rubygems/rubygems] Track HEAD changes for old PR proposal
e3d180620c
2024-04-19 05:18:21 +00:00
Hiroshi SHIBATA
0a14fee02f [rubygems/rubygems] Removed redundant begin
a9d22e5f46
2024-04-19 05:18:20 +00:00
fatkodima
09cbbe0e3d [rubygems/rubygems] Add plugin hooks for Bundler.require
b373b7ed0d
2024-04-19 05:18:20 +00:00
Kevin Newton
a51139230b [ruby/prism] Bump to v0.26.0
eadb09ef36
2024-04-18 18:36:57 +00:00
Kevin Newton
8f908a354e [ruby/prism] "Fix" transpose issue in parser compiler
593d637178
2024-04-18 18:34:42 +00:00
careworry
8e08556fa7
chore: remove repetitive words (#10573)
Signed-off-by: careworry <worrycare@outlook.com>
2024-04-18 15:32:34 +00:00