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

85699 Коммитов

Автор SHA1 Сообщение Дата
Kevin Newton 22536148e2 [PRISM] Use PUSH_SYNTHETIC_PUTNIL for all optional statement bodies 2024-05-28 14:24:18 -04:00
Kevin Newton 07f494ccad [PRISM] Enable TestISeq#test_each_child 2024-05-28 14:24:18 -04:00
Takashi Kokubun 3f256dc66a redmine-backporter.rb: Drop SVN support 2024-05-28 10:47:51 -07:00
Takashi Kokubun 450e9d2495 redmine-backporter.rb: Migrate Readline to Reline
instead of using a local Readline port as a fallback
2024-05-28 10:42:47 -07:00
Takashi Kokubun db7c385897 redmine-backporter.rb: Get rid of VERSION
that has never been utilized
2024-05-28 10:39:39 -07:00
Takashi Kokubun e5759e4126 redmine-backporter.rb: Print help on wrong usage 2024-05-28 10:34:16 -07:00
Maxime Chevalier-Boisvert 1eff5a98f1
YJIT: limit size of call count stats dict (#10858)
* YJIT: limit size of call count stats dict

Someone reported that logs were getting bloated because the
ISEQ and C call count dicts were huge, since they include all
of the call sites. I wrote code on the Rust size to limit the
size of the dict to avoid this problem. The size limit is
hardcoded at 20, but I figure this is probably fine?

* Fix bug reported by Kokubun.
2024-05-28 13:23:01 -04:00
Kevin Newton fd95ba255a Make ensure first lineno the first line of the ensure
Previously, ensure ISEQs took their first line number from the
line number coming from the AST. However, if this is coming from
an empty `begin`..`end` inside of a method, this can be all of the
way back to the method declaration. Instead, this commit changes
it to be the first line number of the ensure block itself.

The first_lineno field is only accessible through manual ISEQ
compilation or through tracepoint. Either way, this will be more
accurate for targeting going forward.
2024-05-28 13:12:21 -04:00
Kevin Newton 8f84fbbf96 [PRISM] Enable TestSyntax#test_dedented_heredoc_continued_line 2024-05-28 13:11:52 -04:00
Kevin Newton 7f18126882 [ruby/prism] Fix line continuation heredoc dedent calculation
https://github.com/ruby/prism/commit/63b596df07
2024-05-28 16:31:55 +00:00
Nobuyoshi Nakada 31c9a3a1d3 [Bug #20438] Disallow "%\n" and "%\0" 2024-05-29 01:02:32 +09:00
Herwin 61e2916d1c [ruby/prism] Typo fix: poitive => positive
https://github.com/ruby/prism/commit/d13a05252d
2024-05-28 15:28:02 +00:00
David Rodríguez 6b3935250e [rubygems/rubygems] Bump COCs to latest Contributor Covenant version
https://github.com/rubygems/rubygems/commit/73794a95b9
2024-05-28 15:10:59 +00:00
Nobuyoshi Nakada 7d144781a9
[Bug #20512] Set coderange in `Range#each` of strings 2024-05-28 16:59:51 +09:00
Nobuyoshi Nakada 0a92c9f2b0
Set empty strings to ASCII-only 2024-05-28 16:24:21 +09:00
Nobuyoshi Nakada 43798e0f6d
lldb: Show coderange 2024-05-28 16:23:18 +09:00
Jean Boussier ceeb9957c3 Make value_type.h compatible with -Wconversion
[Feature #20507]

This was missed from the initial commit.

```
../../.././include/ruby/internal/value_type.h:446:27: error: implicit conversion changes signedness: 'enum ruby_value_type' to 'int' [-Werror,-Wsign-conversion]
    rb_unexpected_type(v, t);
    ~~~~~~~~~~~~~~~~~~    ^
```
2024-05-28 08:43:43 +02:00
Mike Dalessio ca2d229e6b Test for compiling without warnings against public headers
Under compilers with WERRORFLAG, MakeMakefile.try_compile treats
warnings as errors, so we can use append_cflags to test whether the
public header files emit warnings with certain flags turned on.

[Regression test for feature #20507]
2024-05-28 07:33:07 +02:00
Mike Dalessio 1b8ba1551b Allow compilation of C extensions with `-Wconversion`
C extension maintainers can now compile with this warning option and
the Ruby header files will generate no warnings.

[Feature #20507]
2024-05-28 07:33:07 +02:00
Jean Boussier 9e9f1d9301 Precompute embedded string literals hash code
With embedded strings we often have some space left in the slot, which
we can use to store the string Hash code.

It's probably only worth it for string literals, as they are the ones
likely to be used as hash keys.

We chose to store the Hash code right after the string terminator as to
make it easy/fast to compute, and not require one more union in RString.

```
compare-ruby: ruby 3.4.0dev (2024-04-22T06:32:21Z main f77618c1fa) [arm64-darwin23]
built-ruby: ruby 3.4.0dev (2024-04-22T10:13:03Z interned-string-ha.. 8a1a32331b) [arm64-darwin23]
last_commit=Precompute embedded string literals hash code

|            |compare-ruby|built-ruby|
|:-----------|-----------:|---------:|
|symbol      |     39.275M|   39.753M|
|            |           -|     1.01x|
|dyn_symbol  |     37.348M|   37.704M|
|            |           -|     1.01x|
|small_lit   |     29.514M|   33.948M|
|            |           -|     1.15x|
|frozen_lit  |     27.180M|   33.056M|
|            |           -|     1.22x|
|iseq_lit    |     27.391M|   32.242M|
|            |           -|     1.18x|
```

Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2024-05-28 07:32:41 +02:00
Étienne Barrié 1376881e9a Stop marking chilled strings as frozen
They were initially made frozen to avoid false positives for cases such
as:

    str = str.dup if str.frozen?

But this may cause bugs and is generally confusing for users.

[Feature #20205]

Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2024-05-28 07:32:33 +02:00
Yusuke Endoh 2114d0af1e Make test_nested_timeouts less flaky
This test randomly fails due to the bug reported in [Bug #20314], where
the two timeouts are too close so that they can expire at the same time.

As a workaround, this change increases the time difference between
timeouts. This will reduce the probability of simultaneous expirations
and lower flakiness.
2024-05-28 12:49:46 +09:00
verdy89 7c6e4bc7ca [ruby/reline] Implement the redo command
(https://github.com/ruby/reline/pull/707)

* Implement the redo command

* Commented out a test that does not pass

* Changed key assignment for redo from "\C-[" to "\C-g"

* Changed redo key assignment from `\C-g` to `\M-\C-_`

* Revert the first implemantation

* Implemented redo by sharing `@past_lines` between undo and redo

* Fixed the index of past_lines that is updated when the cursor is moved

* Fixed deletion of the redo history in regular input

* Renamed variables: past_lines -> input_lines

* Rename @position to @input_lines_position

* Deleted unused variables: `@old_byte_pointer` and `@old_line_index`

https://github.com/ruby/reline/commit/0b2d9fab5f
2024-05-27 16:38:22 +00:00
Yusuke Endoh bc47ca5546 Add a debug print for a random failure
```
  1) Error:
TestRubyLiteral#test_float:
ArgumentError: SyntaxError#path changed: "(eval at /home/chkbuild/chkbuild/tmp/build/20240527T050036Z/ruby/test/ruby/test_literal.rb:642)"->"(eval at /home/chkbuild/chkbuild/tmp/build/20240527T050036Z/ruby/test/ruby/test_literal.rb:642)"
```
https://rubyci.s3.amazonaws.com/s390x/ruby-master/log/20240527T050036Z.fail.html.gz
2024-05-27 18:16:28 +09:00
Yusuke Endoh 4fee1019f6 Try to upload core file on macos GitHub Actions
A core dump occurred, but failed to capture the core file.
https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-sessions/2935062?tab=retried-tests

Looks like a core file was not created. I am not unsure why, so make
sure that the /cores directory is writable and try `ulimit` command.
2024-05-27 13:40:19 +09:00
Nobuyoshi Nakada f4b475993e
Apply optimizations for `putstring` to `putchilledstring` as well 2024-05-27 12:41:38 +09:00
License Update 5853a38043 [rubygems/rubygems] Update SPDX license list as of 2024-05-22
https://github.com/rubygems/rubygems/commit/f91ac04397
2024-05-27 01:45:38 +00:00
Marcus Stollsteimer 4949f0a928 [rubygems/rubygems] Fix typo in description of build:checksum task
https://github.com/rubygems/rubygems/commit/351ff2512f
2024-05-26 21:42:45 +00:00
Nobuyoshi Nakada 0d44e23831
Prevent test-bundled-gems outputs from mixing
Run test-bundled-gems-run and test-bundled-gems-spec sequentially.
2024-05-26 22:17:57 +09:00
Nobuyoshi Nakada bc50f2a3f1
Debug unexpectedly changed path 2024-05-26 20:14:18 +09:00
eileencodes 0f9e50b8c5 Fix macos bug deleting too many files
Since #10209 we've been noticing that on macos after running `make
clean` the `coroutine/arm64/Context.S` file is missing, causing
subsequent make calls to fail because `Context.S` is needed to build
`Context.o`.

The reason this is happening is because macos is case-insensitive so the
`.s` looks for `coroutine/arm64/Context.s` and finds
`coroutine/arm64/Context.s`. This does not happen on linux because the
filesystem is case sensitive.

I attempted to use `find` because it is case sensitive regardless of
filesystem, but it was a lot slower than `rm` since we can't pass
multiple file names the same way to `find`.

Reverting this small part of #10209 fixes the issue for macos and it
wasn't clear that those changes were strictly necessary for the rest of
the PR.

We changed the original code to use `rm` instead of `delete` because it
is not standarized on POSIX.
2024-05-26 19:11:23 +09:00
Go 508f331048 [ruby/reline] allow space in config value
(https://github.com/ruby/reline/pull/705)

* allow space in config value

fix https://github.com/ruby/reline/pull/657

* remove inline comments

* Revert "remove inline comments"

This reverts commit https://github.com/ruby/reline/commit/2438347c1a10.

* refactoring

* remove unnecessary comment handling

https://github.com/ruby/reline/commit/d60f1e1e39
2024-05-26 08:28:25 +00:00
Martin Emde d2c4363e0c [rubygems/rubygems] Add CompactIndexClient::Parser specs
https://github.com/rubygems/rubygems/commit/4bf455a498
2024-05-25 17:47:07 +00:00
Martin Emde 6b0afbb111 [rubygems/rubygems] Reorganize and refactor CompactIndexClient
https://github.com/rubygems/rubygems/commit/71bcf354f5
2024-05-25 17:47:07 +00:00
Nobuyoshi Nakada 0bae2f0002
[Bug #20510] Do not count optional hash argument for `IO.new`
Since `IO.new` accepts one or two positional arguments except for the
optional hash argument, exclude the optional hash argument from the
check for delegation to `IO.new`.
2024-05-25 19:15:25 +09:00
Jacklyn Ma 4d0c5486a2 [rubygems/rubygems] update cache checksums to decrease string allocations
https://github.com/rubygems/rubygems/commit/85371a961a
2024-05-24 21:04:21 +00:00
Kevin Newton c7281e2d67 [ruby/prism] Fix up ruby_parser string concat
https://github.com/ruby/prism/commit/4b06eae0df
2024-05-24 19:27:44 +00:00
Kevin Newton 9f71393fe4 [ruby/prism] Fix up self-write order for lex
https://github.com/ruby/prism/commit/8f6da451b4
2024-05-24 17:37:51 +00:00
Kevin Newton f8b750370e [ruby/prism] Remove Debug module
https://github.com/ruby/prism/commit/4d8929ff6a
2024-05-24 17:19:38 +00:00
Kevin Newton 745a948b6d [ruby/prism] Remove dynamic Debug module methods
https://github.com/ruby/prism/commit/b850794db9
2024-05-24 17:19:36 +00:00
Kevin Newton 79001c8b4a [ruby/prism] Remove error formatting, put directly in CRuby
https://github.com/ruby/prism/commit/53b2866487
2024-05-24 17:19:36 +00:00
Kevin Newton 653652bcbe [ruby/prism] Remove Debug#named_captures
https://github.com/ruby/prism/commit/5050dfbe70
2024-05-24 17:19:35 +00:00
Kevin Newton e1041a8eda [ruby/prism] Move profiling to prism module directly
https://github.com/ruby/prism/commit/75fabf7081
2024-05-24 17:19:35 +00:00
Kevin Newton b04c959621 [ruby/prism] Remove various unused memsize infra
https://github.com/ruby/prism/commit/283938ed1f
2024-05-24 17:19:34 +00:00
Kevin Newton b8681c2e37 [ruby/prism] Remove Debug::integer_parse
https://github.com/ruby/prism/commit/14e397598b
2024-05-24 17:19:33 +00:00
Kevin Newton 870350253e [ruby/prism] Remove Debug::static_inspect
https://github.com/ruby/prism/commit/486c71c426
2024-05-24 17:19:33 +00:00
Kevin Newton 47b723f890
[PRISM] Use only bundled error formatting 2024-05-24 13:05:35 -04:00
Kevin Newton ba336027be [PRISM] Move error formatting into Ruby 2024-05-24 12:58:44 -04:00
Kevin Newton 47f0965269 Update duplicated when clause warning message 2024-05-24 12:36:54 -04:00
Kevin Newton 7021e15652 [ruby/prism] Update duplicated when error message
https://github.com/ruby/prism/commit/54316fd8a0
2024-05-24 12:36:54 -04:00