Commit graph

77079 commits

Author SHA1 Message Date
git
55367b3bd7 Update bundled gems list at e87d088291 [ci skip] 2023-03-06 06:04:03 +00:00
Koichi Sasada
e87d088291 Change bytecode of f(*a, **kw)
`f(*a, **kw)` is compiled to `f([*a, kw])` but it makes an dummy
array, so change it to pass two arguments `a` and `kw` with calling
flags.

```
ruby 3.2.0 (2022-12-29 revision a7d467a792) [x86_64-linux]
Calculating -------------------------------------
               foo()     15.354M (± 4.2%) i/s -     77.295M in   5.043650s
              dele()     13.439M (± 3.9%) i/s -     67.109M in   5.001974s
             dele(*)      6.265M (± 4.5%) i/s -     31.730M in   5.075649s
            dele(*a)      6.286M (± 3.3%) i/s -     31.719M in   5.051516s
      dele(*a, **kw)      1.926M (± 4.5%) i/s -      9.753M in   5.076487s
         dele(*, **)      1.927M (± 4.2%) i/s -      9.710M in   5.048224s
           dele(...)      5.871M (± 3.9%) i/s -     29.471M in   5.028023s
         forwardable      4.969M (± 4.1%) i/s -     25.233M in   5.087498s

ruby 3.3.0dev (2023-01-13T01:28:00Z master 7e8802fa5b) [x86_64-linux]
Calculating -------------------------------------
               foo()     16.354M (± 4.7%) i/s -     81.799M in   5.014561s
              dele()     14.256M (± 3.5%) i/s -     71.656M in   5.032883s
             dele(*)      6.701M (± 3.8%) i/s -     33.948M in   5.074938s
            dele(*a)      6.681M (± 3.3%) i/s -     33.578M in   5.031720s
      dele(*a, **kw)      4.200M (± 4.4%) i/s -     21.258M in   5.072583s
         dele(*, **)      4.197M (± 5.3%) i/s -     21.322M in   5.096684s
           dele(...)      6.039M (± 6.8%) i/s -     30.355M in   5.052662s
         forwardable      4.788M (± 3.2%) i/s -     24.033M in   5.024875s
```
2023-03-06 15:03:06 +09:00
tomoya ishida
0463c5806a [ruby/irb] Improve method completion for string and regexp that
includes word break characters
(https://github.com/ruby/irb/pull/523)

* Improve method completion for string and regexp that includes word break characters

* Remove completion-test's assert_not_include because candidates no longer include every possible methods

* Add comment about string's method completion regexp

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

* Add comment about regexp's method completion regexp

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

---------

aa8128c533

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-03-06 05:52:46 +00:00
Hiroshi SHIBATA
62e2b61607
Replaced non-ascii charactor. It fails version detection at net-http.gemspec.
>#   Returns the X509 certificate chain for the session<E2><80><99>s socket peer.
2023-03-06 14:50:53 +09:00
Takashi Kokubun
760fe0a78a Disable test-spec as well for annocheck
7578505652
2023-03-05 21:27:05 -08:00
Takashi Kokubun
5d35b4b0e1 Skip test-all for annocheck
It started to fail since totally unrelated changes. It suddenly gets
killed by SIGTERM only on this environment:
7578344307

For now, we have no idea how to fix this, so let me skip this until we
figure it out.
2023-03-05 21:12:00 -08:00
Takashi Kokubun
f5b6b3dba7
Split a workflow for annocheck (#7450)
It's not really about different compilers. It seems confusing to have
this in compilers.yml.

This change only forks the entire workflow and modifies only matrix
entries.
2023-03-05 21:10:31 -08:00
Nobuyoshi Nakada
a5310e609d [DOC] Fix options of Regexp#initialize
`Integer#|` is bit-wise OR operator, not logical OR.
2023-03-06 13:57:17 +09:00
Nobuyoshi Nakada
8ee604b9d4 rb_scan_args never fills optional arguments with Qundef 2023-03-06 13:57:17 +09:00
Koichi Sasada
883871d722 add a test for Ractor
Ractor should take care method cache invalidation.
Added test will miss method cache on each method call.
2023-03-06 13:30:54 +09:00
Hiroshi SHIBATA
f70b46dbc7
More debug for 75829f4d37 2023-03-06 13:01:54 +09:00
Hiroshi SHIBATA
75829f4d37
Added debug message for 20230306T023004Z.fail.html.gz#dist 2023-03-06 12:45:05 +09:00
dependabot[bot]
7fcb782e2d Bump ruby/setup-ruby from 1.139.0 to 1.143.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.139.0 to 1.143.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](92aece5fc9...31a7f6d628)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 12:39:18 +09:00
Hiroshi SHIBATA
5ad81e6627
Revert "Update bundled gems list at 2023-03-06"
This reverts commit 84150e6901.
2023-03-06 10:42:50 +09:00
Hiroshi SHIBATA
38831ae290
Introduce UPDATE_BUNDLED_GEMS_ALL option for auto update for bundled_gems file
We used `url` field for testing via git clone. Because `Gem::Specification#homepage` or
  `Gem::Specification#metadata` could assign non-git url. Unfotunately, We should specify
  clone URL for testing.
2023-03-06 10:42:36 +09:00
git
84150e6901 Update bundled gems list at 2023-03-06 2023-03-06 00:49:09 +00:00
Hiroshi SHIBATA
848b55ad8f
minitest moved minitest org from seattlerb now 2023-03-06 09:34:54 +09:00
Hiroshi SHIBATA
0c9a2ce6e0 [rubygems/rubygems] Build default gems same as fresh installtion.
Current implementation tried to build installation artifact. But default gems
  didn't provide normal gem files. So, It's always build failure.

  7432842788

    ERROR:  Error installing pkg/bigdecimal-3.1.4.gem:
    ERROR: Failed to build gem native extension.

    No such file or directory @ dir_s_mkdir - /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/bigdecimal-3.1.4/ext/bigdecimal/.gem.20230225-2301-2mul99

    Gem files will remain installed in /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/bigdecimal-3.1.4 for inspection.
    Results logged to /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/extensions/x86_64-darwin-19/3.3.0+0/bigdecimal-3.1.4/gem_make.out

2157aa8ec8
2023-03-05 23:52:28 +00:00
Hiroshi SHIBATA
bab809d98f [rubygems/rubygems] Introduce Gem::Specification.find_by_full_name for finding conbination of name and version for gemspec
0430551215
2023-03-05 23:52:28 +00:00
Aaron Patterson
fc5482d088
Expose the address of MJIT Pointers (#7446)
This way we can manually dereference pointers with Fiddle
2023-03-05 13:00:34 -08:00
Burdette Lamar
1b4c1492c1 [ruby/net-http] [DOC] What's Here for Net:HTTP
(https://github.com/ruby/net-http/pull/128)

39e70f0f9b
2023-03-05 19:06:37 +00:00
Takashi Kokubun
477fc776fd Just use the latest minitest 2023-03-04 22:35:50 -08:00
Takashi Kokubun
17ef1c8164 Revert "Workaround minitest's version issue"
This reverts commit a3abe3fd6d.
2023-03-04 22:34:58 -08:00
git
ecb99feff4 Update bundled gems list at a3abe3fd6d [ci skip] 2023-03-05 06:30:59 +00:00
Takashi Kokubun
a3abe3fd6d Workaround minitest's version issue
Every RubyCI is broken because minitest has a newer version.
20230305T061003Z.fail.html.gz
2023-03-04 22:29:20 -08:00
Stan Lo
191e4ae33f [ruby/irb] Drop chained methods' completion support
(https://github.com/ruby/irb/pull/529)

Consider completion for this example: `foo.bar.b`

Without type information, it is hard to know the return value of the `bar`
method, so the current implementation interates through `ObjectSpace` to
get all possible candidates for the second method.

In small projects, the performance and accuracy are acceptable. But in
bigger projects, the performance is unacceptable and the accuracy is mostly
poor.

So this commit drops the support for chained methods' completion.
2023-03-04 15:34:49 +00:00
tomoya ishida
6f81e38d1d [ruby/reline] Fix completion with multiline
(https://github.com/ruby/reline/pull/513)

d76c482c5f
2023-03-04 05:56:00 +00:00
Takashi Kokubun
4782bb352e Another attempt to skip test_ractor on ci.rvm.jp
This reverts commit 8d31a60f47.
2023-03-03 20:39:38 -08:00
Takashi Kokubun
8d31a60f47 Fix a YJIT enablement check
This should be enough for `make test` and `make btest-ruby` while it
doesn't work for `make btest`.
2023-03-03 17:03:26 -08:00
Maxime Chevalier-Boisvert
4d59d01621
YJIT: fix CI issue reported by Koichi caused by small stack patch (#7442)
Includes small reproduction produced by Kokubun.

http://ci.rvm.jp/results/trunk-yjit@ruby-sp2-docker
2023-03-03 15:02:52 -08:00
Peter Zhu
62c2082f1f [Bug #19469] Fix crash when resizing generic iv list
The following script can sometimes trigger a crash:

```ruby
GC.stress = true

class Array
  def foo(bool)
    if bool
      @a = 1
      @b = 2
      @c = 1
    else
      @c = 1
    end
  end
end

obj = []
obj.foo(true)

obj2 = []
obj2.foo(false)

obj3 = []
obj3.foo(true)
```

This is because vm_setivar_default calls rb_ensure_generic_iv_list_size
to resize the iv list. However, the call to gen_ivtbl_resize reallocs
the iv list, and then inserts into the generic iv table. If the
st_insert triggers a GC then the old iv list will be read during
marking, causing a use-after-free bug.

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
2023-03-03 16:12:03 -05:00
Peter Zhu
0700d0fd1c Fix indentation in vm_setivar_default 2023-03-03 16:12:03 -05:00
Takashi Kokubun
8c8548b175
YJIT: Fix a cargo test warning on x86_64 (#7428) 2023-03-03 15:48:14 -05:00
Kevin Menard
8e13e705f9 [ruby/irb] Remove no longer necessary TruffleRuby test exclusions.
(https://github.com/ruby/irb/pull/527)

8473d0bc0f

Co-authored-by: Stan Lo <stan.lo@shopify.com>
2023-03-03 15:25:29 +00:00
Rômulo Ceccon
d78ae78fd7 rb_str_modify_expand: clear the string coderange
[Bug #19468]

b0b9f7201a errornously stopped
clearing the coderange.

Since `rb_str_modify` clears it, `rb_str_modify_expand`
should too.
2023-03-03 15:32:25 +01:00
tomoya ishida
b49053a6be [ruby/irb] Avoid slow symbol completion when completion target is an
empty symbol
(https://github.com/ruby/irb/pull/534)

35697f3ef3
2023-03-03 13:41:21 +00:00
tomoya ishida
a2b776a9b7 [ruby/irb] Fix prompt test not to change STDIO.external_encoding
(https://github.com/ruby/irb/pull/535)

09f16259db
2023-03-03 10:18:51 +00:00
Johnny Shields
f1fe4a4a99 [rubygems/rubygems] Update current_ruby.rb
8755ca959e
2023-03-03 09:50:30 +00:00
johnnyshields
79ede4ae99 [rubygems/rubygems] Alias CurrentRuby#mswin?, mswin64?, mingw?, x64_mingw? to #windows?. (This is done instead of logging a deprecation warning.)
b9fcc7c0ab
2023-03-03 09:50:29 +00:00
Nobuyoshi Nakada
6b46057e5c
Expand the test directory to real path
When the test source directory path contains symbolic links, that
directory might be placed earlier in the result of
`IRB::InputCompletor.retrieve_gem_and_system_load_path`, than other
directories in the source tree that are expanded to the real path.  In
that case, the test file in "csv" under the test directory of csv gem
instead of the library path will be the first candidate, in
`TestIRB::TestCompletion#test_complete_require_library_name_first`.

```
<"'csv"> expected but was
<"'csv/helper">.
```
2023-03-03 15:30:02 +09:00
Nobuyoshi Nakada
680bd9027f [Bug #19471] Regexp.compile should handle keyword arguments
As well as `Regexp.new`, it should pass keyword arguments to the
`Regexp#initialize` method.
2023-03-03 15:27:37 +09:00
Hiroshi SHIBATA
103a65316c
Regenerate parsers with racc-1.6.2 2023-03-03 13:46:04 +09:00
David Rodríguez
90b74d8c65 [rubygems/rubygems] Fix warning about ambiguous /
```
/path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:745: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
```

e6a538b5c8
2023-03-03 13:43:59 +09:00
David Rodríguez
7fea848568 [rubygems/rubygems] Fix warnings about unused variable
```
/path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:180: warning: assigned but unused variable - platforms
```

7e022cb5e3
2023-03-03 13:43:59 +09:00
David Rodríguez
b6d914c722 [rubygems/rubygems] Fix warning about ambiguous *
```
/path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:42: warning: `*' interpreted as argument prefix
```

0806ebf4e0
2023-03-03 13:43:58 +09:00
Nobuyoshi Nakada
bd17bea6c5 [ruby/irb] Fix warnings because of @context.main.delete
If the main object of the context has `#delete` method, the following
warning is printed.

```
irb: warn: can't alias delete from irb_delete.
```

00b39be61f
2023-03-03 02:44:35 +00:00
Koichi Sasada
941d36d195 fix timing bug
passing will and closing notification can conflict and
`Ractor::Selector#empty?` can return wrong answer.
This patch fix it.

```
     s = Ractor::Selector.new
     s.add Ractor.new{10}
     s.add Ractor.new{20}
     r, v = s.wait
     vs = []
     vs << v
     r, v = s.wait
     vs << v
     [*vs.sort, s.empty?]
  #=> "[10, 20, false]" (expected "[10, 20, true]")
```
2023-03-03 10:19:37 +09:00
Ezra-Shimon Rosenfeld
ddd3c92bf6 [DOC] Add missing word to documentation_guide.md 2023-03-03 09:40:40 +09:00
Takashi Kokubun
490efd6732 Increase timeout for MinGW make test
Apparently it's too short for MinGW
7535630842
2023-03-02 15:05:44 -08:00
Maxime Chevalier-Boisvert
7b9aeaffcb
YJIT: shrink stack_size/sp_offet to u8/i8 (#7426) 2023-03-02 17:30:31 -05:00