Commit graph

14675 commits

Author SHA1 Message Date
tomoya ishida
68b6fe7048 [ruby/reline] Avoid STDIN.winsize called in require "reline"
(https://github.com/ruby/reline/pull/703)

21891c47c4
2024-05-10 17:19:42 +00:00
Kevin Newton
afdfff933f
[PRISM] Bump to version 0.29.0 2024-05-10 13:09:45 -04:00
Kevin Newton
2e44664547 [ruby/prism] operator rename
b5e47f5c42
2024-05-10 11:47:48 -04:00
Kevin Newton
34e0b5b2d4 [ruby/prism] Fix tapioca require order
15bf727881
2024-05-10 14:47:21 +00:00
Kevin Newton
2bc309e7f3 [ruby/prism] Fix RBS outside of prism
ee73ad757f
2024-05-10 13:58:09 +00:00
Kevin Newton
3f664c3738 [ruby/prism] Prism::CallNode#full_message_loc
fa6fe9be84
2024-05-10 13:40:04 +00:00
Stan Lo
c68bb24088 [ruby/irb] Add a new initialization step to validate IRB.conf's
values
(https://github.com/ruby/irb/pull/953)

Currently, users can only find out that they have set a wrong value
for IRB configs when the value is used, with opaque error messages like
"comparison of Integer with true failed (TypeError)".

This commit adds a new initialization step to validate the values of
some IRB configs, so that users can find out about the wrong values
during the initialization of IRB.

af8ef2948b
2024-05-10 11:40:58 +00:00
Kevin Newton
69d0a3b033 [ruby/irb] Simplify regexp to account for prism error messages
(https://github.com/ruby/irb/pull/954)

e0c29be074

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-05-10 09:39:11 +00:00
Mari Imaizumi
fba7bdb710 [ruby/reline] Bump version to 0.5.6
(https://github.com/ruby/reline/pull/700)

1b6c29a2b1
2024-05-09 09:52:29 +00:00
Hiroshi SHIBATA
fb6cfb413d
Mark rdoc as bundled gems at Ruby 3.5 2024-05-09 17:39:57 +09:00
Josef Šimánek
8bd6ae4c40 [rubygems/rubygems] Monthly man update for May 2024.
9ee7069841
2024-05-08 23:58:45 +00:00
tomoya ishida
26446cccc9 [ruby/reline] Implement bracketed paste insert
(https://github.com/ruby/reline/pull/655)

e92dcbf514
2024-05-08 16:00:30 +00:00
Kevin Newton
548a72e537
[PRISM] Sync prism version bump 2024-05-08 10:20:48 -04:00
Yuta Saito
80adf6a18c [rubygems/rubygems] Accept WASI as an OS name in Gem::Platform
1209d3c6b0
2024-05-07 05:36:35 +00:00
David Rodriguez
5c018cddcc [rubygems/rubygems] Remove unnecessary compatibility code
160a515412
2024-05-06 17:06:50 +00:00
Nobuyoshi Nakada
95ae123343 [ruby/did_you_mean] Move development dependencies to Gemfile
24c06dd509
2024-05-05 23:22:28 +00:00
Stan Lo
93cffcf961 [ruby/irb] Bump version to v1.13.1
(https://github.com/ruby/irb/pull/951)

66318d0a34
2024-05-05 11:11:31 +00:00
Stan Lo
e973f9cbb3 [ruby/irb] Clarify that the context is IRB context
(https://github.com/ruby/irb/pull/950)

8cde57f55a
2024-05-05 10:44:52 +00:00
Mari Imaizumi
fca6c55a53 [ruby/reline] Remove not implemented variables
(https://github.com/ruby/reline/pull/699)

328699e901
2024-05-05 07:22:52 +00:00
tomoya ishida
d679afe9f9 [ruby/reline] Add name defined in readline to completion key
bindings C-i C-p C-n
(https://github.com/ruby/reline/pull/698)

1314787bbb
2024-05-05 07:09:52 +00:00
Koichi ITO
b181ba7400 [ruby/prism] Use version: 3.3.1 against Translation::Parser
Follow up https://github.com/ruby/prism/pull/2760.

This PR updates the `Translation::Parser` to use version 3.3.1 when the version 3.3 is specified.
The Parser gem is structured to support the latest patch versions, hence this aligns with Parser-compatible versioning.
As noted in https://github.com/ruby/prism/pull/2760, the behavior remains unchanged with this switch from 3.3.0 to 3.3.1.

efde09d318
2024-05-04 16:31:58 +00:00
tomoya ishida
96710a3139 [ruby/irb] Change debug test workaround only enabled when output is
tty
(https://github.com/ruby/irb/pull/949)

3f231b8622
2024-05-04 09:03:55 +00:00
Stan Lo
bd42f0898d [ruby/irb] Improve help message for no meta commands
(https://github.com/ruby/irb/pull/948)

* Remove unnecessary code from command tests

* Improve help message for no meta commands

1. Add placeholder values for both command category and description
2. Update help command's output to give different types of categories
   more explicit ordering

b1ef58aeff
2024-05-04 03:32:34 +00:00
Stan Lo
fb2ea7084f [ruby/irb] Use flag instead of caller for debug's binding.irb
check
(https://github.com/ruby/irb/pull/947)

4a4d7a4279
2024-05-04 03:22:17 +00:00
Kenichi Kamiya
a510175e8f [ruby/irb] Avoid raising errors while running help for custom
commands
(https://github.com/ruby/irb/pull/944)

* Avoid raising errors while running help for custom commands

Raising an error from the help command is not a pleasure for the
end user, even if the command does not define any attributes

* Update test/irb/command/test_custom_command.rb

---------

c8bba9f8dc

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-05-03 22:08:49 +00:00
Kevin Newton
d4a6d0c177 [ruby/prism] Prism::Location#adjoin
a298db68e3
2024-05-03 19:14:03 +00:00
Kevin Newton
7a49edcf1f [ruby/prism] Prism::Node#tunnel
0bf5d651da
2024-05-03 18:37:19 +00:00
Vinicius Stock
4fbb208185 [ruby/prism] Create specialized ASCIISource with asciionly optimizations
40993166a8
2024-05-03 18:10:21 +00:00
Kevin Newton
97654bee49 [ruby/prism] Remove deprecated #child usage
14d9b431e2
2024-05-03 16:02:13 +00:00
David Rodriguez
281df1e495 [rubygems/rubygems] Remove Gem::Specification#mark_version
This gets in the middle if we ever start allowing to build as if using a
different RubyGems version than the one being run.

This could be useful to make `gem rebuild` a little more usable, and
it's already done by Bundler specs which already make this method a noop
when they need this.

I'm not sure forcefully setting this, even if user explicitly specified
something else is helpful.

Since this could potentially prevent gems explicitly setting a constant
RubyGems version from building, I changed the error of incorrect
RubyGems version from a hard error to a warning, since it will start
happening in those cases if we stop overwriting the version.

45676af80d
2024-05-03 15:12:55 +00:00
Kevin Newton
5758e45657 [ruby/prism] Change ConstantPathNode#child to ConstantPathNode#{name,name_loc}
This has been requested for a long time, and I'm finally doing it
now. Unfortunately this is a breaking change for all of the APIs.

I've added in a Ruby method for `#child` that is deprecated so that
existing usage doesn't break, but for everyone else this is going
to be a bit of a pain.

9cbe74464e
2024-05-03 11:11:57 -04:00
Kevin Newton
1d51e929b1 [ruby/prism] Assume eval context for ruby_parser and ripper
e4d6984892
2024-05-03 13:12:27 +00:00
Earlopain
32b1dea566 [ruby/prism] Assume an eval context for Prism::Translation::Parser
This is similar to https://github.com/davidwessman/syntax_tree-erb/issues/81 but for RuboCop
The parser gem doesn't support these types of checks,
see https://github.com/whitequark/parser?tab=readme-ov-file#syntax-check-of-block-exits

While this is technically a bug in the parser gem, it does increase compatibility
and allows prism to be used when linting erb or haml with a RuboCop extension.

6c59ae6a00
2024-05-03 12:53:01 +00:00
Kevin Newton
7c029f612f [ruby/prism] Remove generics from sorbet types
080d84fd03
2024-05-03 12:36:57 +00:00
Jenny Shen
c1b11c50cb [rubygems/rubygems] Rename credential email to identifier in WebAuthn poller
5e3e55f8bc
2024-05-03 10:54:27 +00:00
Stan Lo
945a99e81a Sync IRB 241e061 2024-05-02 14:33:30 -04:00
Mari Imaizumi
008f2b9b6a [ruby/reline] Bump version to 0.5.5
(https://github.com/ruby/reline/pull/696)

8bf71d0b81
2024-05-02 16:28:19 +00:00
tomoya ishida
032070d793 [ruby/irb] Add workaround for ruby/debug/test/console/irb_test
failing with StdioInputMethod
(https://github.com/ruby/irb/pull/943)

acf3c1816e
2024-05-02 16:21:46 +00:00
Kevin Newton
7c0cf71049 [ruby/prism] Node#script_lines and supporting infra
cb4a8ab772
2024-05-02 15:27:18 +00:00
tomoya ishida
c78cebb469 [ruby/reline] Fix default and additional key bindings vanish bug
(https://github.com/ruby/reline/pull/697)

fc9b4d2274
2024-05-02 14:41:07 +00:00
tomoya ishida
eb82ea6218 [ruby/reline] Fix prompt width calculation bug. Test with colored
prompt
(https://github.com/ruby/reline/pull/695)

24aab01cbc
2024-05-02 06:06:31 +00:00
Mari Imaizumi
fdf88a2c10 [ruby/reline] Avoid reading .inputrc repeatedly
(https://github.com/ruby/reline/pull/694)

c8d4802a0f
2024-05-02 05:50:08 +00:00
Kevin Newton
8e1647c3aa [ruby/prism] Support passing version 3.3.1
445a0f0d22
2024-05-01 23:03:25 +00:00
Stan Lo
fef6f5f2e1 [ruby/irb] Bump version to v1.13.0
(https://github.com/ruby/irb/pull/941)

* Bump version to v1.13.0

* Add Documentation category to changelog

b9b1f35c99
2024-05-01 15:20:01 +00:00
tomoya ishida
77f5301cd1 [ruby/irb] Let IRB::Color.colorable? always return true|false
(https://github.com/ruby/irb/pull/940)

0bbe435ffe
2024-05-01 14:52:53 +00:00
Stan Lo
1000c27db8 [ruby/irb] Support IRB.conf[:BACKTRACE_FILTER]
(https://github.com/ruby/irb/pull/917)

* Use 'irbtest-' instead if 'irb-' as prefix of test files.

Otherwise IRB would mis-recognize exceptions raised in test files as
exceptions raised in IRB itself.

* Support `IRB.conf[:BACKTRACE_FILTER]``

This config allows users to customize the backtrace of exceptions raised
and displayed in IRB sessions. This is useful for filtering out library
frames from the backtrace.

IRB expects the given value to response to `call` method and return
the filtered backtrace.

6f6e87d769
2024-05-01 14:23:09 +00:00
Alan Wu
2a978ee047
YJIT: Fix Struct accessors not firing tracing events (#10690)
* YJIT: Fix `Struct` accessors not firing tracing events

Reading and writing to structs should fire `c_call` and `c_return`, but
YJIT wasn't correctly dropping those calls when tracing.
This has been missing since this functionality was added in 3081c83169,
but the added test only fails when ran in isolation with
`--yjit-call-threshold=1`. The test sometimes failed on CI.

* RJIT: YJIT: Fix `Struct` readers not firing tracing events

Same issue as YJIT, but it looks like RJIT doesn't support writing to
structs, so only reading needs changing.
2024-05-01 10:22:41 -04:00
tomoya ishida
614187f8c2 [ruby/reline] Fix completion dialog position when completed part is
wordwrapped
(https://github.com/ruby/reline/pull/692)

2d9acd16fe
2024-04-30 16:51:25 +00:00
Samuel Giddins
d7ba0fec49 [rubygems/rubygems] Update lib/rubygems/package.rb
c4e75b9f74
2024-04-30 15:34:49 +00:00
Samuel Giddins
d950609ec7 [rubygems/rubygems] Add a limit to the size of the metadata and checksums files in a gem package.
This is to prevent a malicious gem from causing a denial of service by
including a very large metadata or checksums file,
which is then read into memory in its entirety just by opening the gem package.

This is guaranteed to limit the amount of memory needed, since
gzips (which use deflate streams for compression) have a maximum compression
ratio of 1032:1, so the uncompressed size of the metadata or checksums file
will be at most 1032 times the size of the (limited) amount of data read.

This prevents a gem from causing 500GB of memory to be allocated
to read a 500MB metadata file.

a596e3c5ec
2024-04-30 15:34:48 +00:00