Commit graph

74217 commits

Author SHA1 Message Date
Nobuyoshi Nakada
66a650ec41 [ruby/psych] Fix missing abort call
de2b98c7b7

Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2022-10-12 20:24:38 +09:00
Nobuyoshi Nakada
ed01bacf27 [ruby/psych] Abandon when libyaml is not found
0b89eda398
2022-10-12 20:24:37 +09:00
Nobuyoshi Nakada
0360fca4ad
[DOC] Replace the external URIs to docs with rdoc-ref 2022-10-12 13:30:25 +09:00
Nobuyoshi Nakada
b57ecc3eb8
sync_default_gems: Replace the URIs to be redirected
The reference generated by using RDoc without the proper `--page-dir`
option (or `.rdoc_options`) file may contain `/doc/`.  Since these
URIs are redirected by the server now, replace such URIs with the
corresponding rdoc-refs too.
2022-10-12 13:24:53 +09:00
Nobuyoshi Nakada
3539da64fc
[DOC] Replace the external URIs to docs with rdoc-ref 2022-10-12 12:27:40 +09:00
Nobuyoshi Nakada
2b5d4fe28d
sync_default_gems: Add rdoc-ref command to test 2022-10-12 12:27:40 +09:00
Nobuyoshi Nakada
df588440ee
sync_default_gems: Replace the external URIs to docs with rdoc-ref 2022-10-12 12:27:40 +09:00
Nobuyoshi Nakada
c67e496886
sync_default_gems: Should match with the beginning of the strings
`git status -z` result is NUL-separated, and can contain newline
characters.
2022-10-12 12:27:40 +09:00
Samuel Williams
04d291a490
Simplify implementation of scheduler io_read and io_write. (#6527) 2022-10-12 15:56:35 +13:00
Kazuki Yamaguchi
4e29ca0c40
Add :ssl_min_version and :ssl_max_version options
Replace :ssl_version option with these two new options. These provide
access to OpenSSL::SSL::SSLContext#{min,max}_version=, which is the
recommended way to specify SSL/TLS protocol versions.
2022-10-12 10:36:51 +09:00
Samuel Williams
ced1d17280
Improvements to IO::Buffer implementation and documentation. (#6525) 2022-10-12 12:59:05 +13:00
Jimmy Miller
467992ee35
Implement optimize send in yjit (#6488)
* Implement optimize send in yjit

This successfully makes all our benchmarks exit way less for optimize send reasons.
It makes some benchmarks faster, but not by as much as I'd like. I think this implementation
works, but there are definitely more optimial arrangements. For example, what if we compiled
send to a jump table? That seems like perhaps the most optimal we could do, but not obvious (to me)
how to implement give our current setup.

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>

* Attempt at fixing the issues raised by @XrXr

* fix allowlist

* returns 0 instead of nil when not found

* remove comment about encoding exception

* Fix up c changes

* Update assert

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>

* get rid of unneeded code and fix the flags

* Apply suggestions from code review

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>

* rename and fix typo

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2022-10-11 16:37:05 -04:00
Jemma Issroff
913979bede
Make inline cache reads / writes atomic with object shapes
Prior to this commit, we were reading and writing ivar index and
shape ID in inline caches in two separate instructions when
getting and setting ivars. This meant there was a race condition
with ractors and these caches where one ractor could change
a value in the cache while another was still reading from it.

This commit instead reads and writes shape ID and ivar index to
inline caches atomically so there is no longer a race condition.

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
2022-10-11 08:40:56 -07:00
Jemma Issroff
ad63b668e2
Revert "Revert "This commit implements the Object Shapes technique in CRuby.""
This reverts commit 9a6803c90b.
2022-10-11 08:40:56 -07:00
dependabot[bot]
5ffbb2be18 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.30 to 0.9.31.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.30...v0.9.31)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

4ad57bacea
2022-10-11 21:29:13 +09:00
dependabot[bot]
ccf61c01d5 [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.30 to 0.9.31.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.30...v0.9.31)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

476490d529
2022-10-11 21:29:01 +09:00
Nobuyoshi Nakada
1a66d42fca
[DOC] use the local rdoc reference than the external URI 2022-10-11 16:25:09 +09:00
Nobuyoshi Nakada
1dd774f53a [ruby/open-uri] Remove unused files from the packages
b2d9efbaf8
2022-10-11 10:44:42 +09:00
Samuel Williams
1bafa4a59b
Ignore failure to set nonblock mode. (#6524) 2022-10-11 10:18:20 +13:00
Jean Boussier
1a7e7bb2d1 object.c: rb_eql returns int not VALUE
It works, but assumes `Qfalse == 0`, which is true today
but might not be forever.
2022-10-10 11:35:16 +02:00
S.H
f1c89c8147
Reuse with_warning_string_from macro 2022-10-10 13:52:25 +09:00
Nobuyoshi Nakada
6c5a8c2043 Ignore excessive precisions 2022-10-10 13:41:46 +09:00
git
2dd1a037de * expand tabs. [ci skip]
Tabs were expanded because the file did not have any tab indentation in unedited lines.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
2022-10-10 13:22:15 +09:00
Nobuyoshi Nakada
0a98dd1cff
Should use dedecated function Check_Type 2022-10-10 13:21:57 +09:00
Vladimir Dementyev
4954c9fc0f Add MatchData#deconstruct/deconstruct_keys 2022-10-10 12:41:13 +09:00
Nobuyoshi Nakada
546566d34b
Do not set $! to SyntaxError when error tolerant 2022-10-09 19:07:21 +09:00
Nobuyoshi Nakada
d9e2ef6000 Extract assert_error_tolerant 2022-10-09 19:05:31 +09:00
Nobuyoshi Nakada
f178ff3933
Allow abbreviated dump options with additional options 2022-10-09 16:27:34 +09:00
Nobuyoshi Nakada
43f692248e
Set AST prettyprint width to 80 explicitly
`PrettyPrint` results depend on the `COLUMNS` environment variable by
default.
2022-10-09 16:26:18 +09:00
yui-knk
561b6c4fa0 Remove unused macro
NEW_PREEXE has not been used since 52a5f76e8b
2022-10-09 14:00:52 +09:00
Peter Zhu
b22a2803a8 Fix flaky test test_thrashing_for_young_objects
The test could be flaky when a heap has below GC_HEAP_INIT_SLOTS number
of free slots because it would trigger a major GC and allocate more
pages.
2022-10-08 15:06:30 -04:00
yui-knk
8483737bbf Fix typos 2022-10-08 23:29:36 +09:00
yui-knk
50f5223236 Fix SEGV of dump parsetree
Assign internal_id to semantic value so that dump parsetree option
can render the tree for these codes without SEGV.

* `def m(&); end`
* `def m(*); end`
* `def m(**); end`
2022-10-08 22:30:50 +09:00
Maciek Rząsa
0f231f2bab [ruby/optparse] Don't treat empty string as an option description
078638ee6d
2022-10-08 19:30:34 +09:00
yui-knk
3531086095 "expr_value" can be error
So that "IF" node is kept in the case below

```
def m
  if
end
```

[Feature #19013]
2022-10-08 17:59:11 +09:00
yui-knk
4bfdf6d06d Move error from top_stmts and top_stmt to stmt
By this change, syntax error is recovered smaller units.
In the case below, "DEFN :bar" is same level with "CLASS :Foo"
now.

```
module Z
  class Foo
    foo.
  end

  def bar
  end
end
```

[Feature #19013]
2022-10-08 17:59:11 +09:00
yui-knk
4f24f3ea94 Treat "end" as reserved word with consideration of indent
"end" after "." or "::" is treated as local variable or method,
see `EXPR_DOT_bit` for detail.
However this "changes" where `bar` method is defined. In the example
below it is not module Z but class Foo.

```
module Z
  class Foo
    foo.
  end

  def bar
  end
end
```

[Feature #19013]
2022-10-08 17:59:11 +09:00
yui-knk
342d4c16d9 Generates "end" tokens if parser hits end of input
but "end" tokens are needed for correct language.

[Feature #19013]
2022-10-08 17:59:11 +09:00
yui-knk
52eaffde86 Support "+error-tolerant" as ruby option
[Feature #19013]
2022-10-08 17:59:11 +09:00
yui-knk
fbbdbdd891 Add error_tolerant option to RubyVM::AST
If this option is enabled, SyntaxError is not raised and Node is
returned even if passed script is broken.

[Feature #19013]
2022-10-08 17:59:11 +09:00
git
7775d14356 Update bundled gems list at 2022-10-08 2022-10-08 07:05:42 +00:00
sampatbadhe
1fe2e34613 Fix a typo Denail-of-Service => Denial-of-Service [ci skip] 2022-10-08 12:36:05 +09:00
Samuel Williams
844a9dff88
Try nil as default for 'default timeout'. (#6509) 2022-10-08 14:02:34 +13:00
st0012
5b3079a8a5 [ruby/irb] Sort constant completion's candidates
ee9b33c817
2022-10-08 03:17:42 +09:00
st0012
7cafe09aec [ruby/irb] Lazily evaluate candidates locals
19a2fcbd87
2022-10-08 03:17:42 +09:00
st0012
7be5e9b971 [ruby/irb] Correct assert_equal's usage in completion tests
https://test-unit.github.io/test-unit/en/Test/Unit/Assertions.html#assert_equal-instance_method

00f90d40ad
2022-10-08 03:17:41 +09:00
st0012
afc1f4fba4 [ruby/irb] Add constant completion test
39f8fcb058
2022-10-08 03:17:40 +09:00
st0012
3e18bb916f [ruby/irb] Regroup completion tests
71631287c8
2022-10-08 03:17:39 +09:00
st0012
83a9b91522 [ruby/irb] Add tests for primitive types' method completion
2e12fac38e
2022-10-08 03:17:38 +09:00
Alan Wu
d76854f166 Update NEWS about [Feature #18589] 2022-10-07 12:38:43 -04:00