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

80486 Коммитов

Автор SHA1 Сообщение Дата
Jemma Issroff f87c31f3e0 [PRISM] Add PM_POP macro, cleanup missing macro usage 2023-10-25 17:27:00 -03:00
HParker 0a3eba0bf7 Fix few test_prism_eval that snuck in 2023-10-25 12:51:20 -07:00
Samuel Giddins 3fe2f2689f [rubygems/rubygems] Raise exception on unexpected EOF in marshal
Instead of NoMethodError being raised by accidentally trying to use nil

https://github.com/rubygems/rubygems/commit/ac8f812bbf
2023-10-25 18:52:38 +00:00
Samuel Giddins 7e7d1f0679 [rubygems/rubygems] Avoid regexp match on every call to `Gem::Platform.local`
The result of `arch` would be ignored if `@local` is set, so wrap all
the logic in `@local ||=` to short-circuit everything

https://github.com/rubygems/rubygems/commit/b67d39f3e0
2023-10-25 18:51:37 +00:00
eileencodes b0a9707364 Use `assert_prism_eval` over `test_prism_eval` in helper
When we use `test_prism_eval`, failed tests will point to the line
number of the `test_prism_eval` method definition instead of the test
that failed. If we use `assert_prism_eval` instead, failed tests will
properly poin to the test that failed because the test framework knows
to stop the backtrace earlier.

Before line number in failure points to helper definition:

```
Prism::TestCompilePrism#test_RegularExpressionNode = 0.21 s
  1) Failure:
Prism::TestCompilePrism#test_RegularExpressionNode [test/ruby/test_compile_prism.rb:755]:
</pit/> (Windows-31J) expected but was
</pit/> (US-ASCII).
```

After line number in failure points to test that failed:

```
Prism::TestCompilePrism#test_RegularExpressionNode = 0.00 s
  1) Failure:
Prism::TestCompilePrism#test_RegularExpressionNode [test/ruby/test_compile_prism.rb:334]:
</pit/> (Windows-31J) expected but was
</pit/> (US-ASCII).
```
2023-10-25 11:00:13 -07:00
Samuel Giddins fa3cc4afcb [rubygems/rubygems] Set file path when eval-ing local specification in EndpointSpecification
Not strictly necessary, but there is no reason not to be helpful and set the path

https://github.com/rubygems/rubygems/commit/894c0303dd
2023-10-25 17:24:06 +00:00
Jemma Issroff 8197bbb0a9 [PRISM] Toggled accepts_no_kwarg to true on NoKeywordsParameterNode 2023-10-25 13:02:44 -03:00
Jemma Issroff fb0a30166d [PRISM] Add tests for ParametersNode 2023-10-25 13:02:44 -03:00
Jemma Issroff fe0827013b [PRISM] Implement NoKeywordsParameterNode 2023-10-25 13:02:44 -03:00
Nobuyoshi Nakada 4f1adb0107
Try newer 2023-10-18 vcpkg [ci skip]
https://github.com/microsoft/vcpkg/issues/33904

This reverts commit 8f1b688177, "Revert
vcpkg.exe to previous release [ci skip]".
2023-10-25 23:57:15 +09:00
Nobuyoshi Nakada 2f8a719b6a Removed unused argument
Eventually, `read_escape` does not use `encp`.
2023-10-25 21:40:41 +09:00
Yusuke Endoh f26d53e905 Reduce the number of times IO is passed in send_io/recv_io test
Since Linux 4.5, sendmsg(2) fails with ETOOMANYREFS if the number of
"in-flight" IOs, which has been sent by sendmsg(2) but has not yet
accepted by recvmsg(2), exceeds the RLIMIT_NOFILE resource limit.

https://rubyci.s3.amazonaws.com/arm64-neoverse-n1/ruby-master/log/20231025T090004Z.fail.html.gz
```
  1) Error:
TestSocket_UNIXSocket#test_fd_passing_race_condition:
Errno::ETOOMANYREFS: Too many references: cannot splice - sendmsg(2)
```

This change reduces the number of times of IO passing under 1024,
which is a default limit in many environments.
2023-10-25 20:37:21 +09:00
Yusuke Endoh de82439215 Do not use pthread_setaffinity_np on s390x
Looks like it randomly causes a segfault

https://rubyci.s3.amazonaws.com/rhel_zlinux/ruby-master/log/20231025T093302Z.fail.html.gz
```
[11186/26148] TestNetHTTP_v1_2#test_set_form/home/chkbuild/build/20231025T093302Z/ruby/tool/lib/webrick/httprequest.rb:197: [BUG] Segmentation fault at 0x000003ff1ffff000
ruby 3.3.0dev (2023-10-25T07:50:00Z master 526292d9fe) [s390x-linux]
```
2023-10-25 20:04:18 +09:00
Nobuyoshi Nakada 54a5623e26
Strip trailing spaces [ci skip] 2023-10-25 18:58:52 +09:00
Hiroshi SHIBATA 1649486834
Fixup 5461bc18f8 2023-10-25 18:49:37 +09:00
Nobuyoshi Nakada 526292d9fe
LLDB: Use `expression` to save the result into the history [ci skip] 2023-10-25 16:50:00 +09:00
OKURA Masafumi bf1362306e [Doc] Improve documentation of PP
* Remove mention to `require 'pp'` for `pretty_inspect`
* Mention the need to add `require 'pp'` to customize
  `#pretty_print(pp)` method
2023-10-25 16:49:09 +09:00
Hiroshi SHIBATA 5461bc18f8
omit failing test at arm64-neoverse-n1 2023-10-25 16:47:26 +09:00
Kouhei Yanagita 593de2b048 Add tests for passing nil to Comparable#clamp(min, max) 2023-10-25 16:34:48 +09:00
Kouhei Yanagita 55eb0d5c78 [DOC] Add doc for behavior when passing nil to Comparable#clamp(min, max) 2023-10-25 16:34:37 +09:00
Hiroya Fujinami 3e64cf60b5
Fix [Bug #19632]: Disable external iterator for frozen enumerator (#7791)
* Fix [Bug #19632]: Disable external iterator for frozen enumerator

Currently, methods to manipulate an external iterator like `#next`
and `#feed` can be called even if a receiver of an enumerator is
frozen. However, these methods change the state of an external
iterator in an enumerator. Therefore, it seems a BUG to me, and
these methods should raise FrozenError if the receiver is frozen.

This fixed the following methods to raise FrozenError if the receiver is
frozen.

- `Enumerator#next`
- `Enumerator#next_values`
- `Enumerator#peek`
- `Enumerator#peek_values`
- `Enumerator#feed`
- `Enumerator#rewind`

* Fix a typo in the document

Thanks @Maumagnaguagno.
2023-10-25 16:32:25 +09:00
Kazuhiro NISHIYAMA a6a67b0524
Do not append latest_date to gems/bundled_gems [ci skip] 2023-10-25 13:10:28 +09:00
Hiroshi SHIBATA c5861903ac [rubygems/rubygems] Handle CI configuration on ignore list for Gem::Specification#files
https://github.com/rubygems/rubygems/commit/4bb0ef3e55
2023-10-25 00:46:09 +00:00
yui-knk 820957b1ee Remove unused macro
`struct RNode_OP_ASGN22` was removed by 37a783a.
2023-10-25 08:12:48 +09:00
yui-knk a2badf3066 Follow up NODE_OP_ASGN2 structure change 2023-10-25 07:38:01 +09:00
Aaron Patterson d8cb827f39 Remove SHAPE_MAX_NUM_IVS
There is no longer a limit on the number of IVs you can store.
SHAPE_MAX_NUM_IVS was used to work around the IV10K problem (the well
known problem where setting 10k instance variables in a row would be too
slow).  The redblack tree works well at any shape depth, even depths
greater than 80, and solves the IV10K problem.
2023-10-24 14:23:17 -07:00
Aaron Patterson 33bebee13a Use available constants
We don't need to intern "initialize" all the time because we already
have `idInitialize` available
2023-10-24 14:23:17 -07:00
Aaron Patterson afae8df373 `get_next_shape_internal` should always return a shape
If it runs out of shapes, or new variations aren't allowed, it will
return "too complex"
2023-10-24 14:23:17 -07:00
Aaron Patterson cfd7c1a276 Allow the shape tree to be traversed
This commit allows the shape tree to be traversed to locate an existing
shape, but it doesn't necessarily allow you to create new variations.
2023-10-24 14:23:17 -07:00
Aaron Patterson 3760baccac Remove new_shape_necessary code
We always create new shapes until we run out!
2023-10-24 14:23:17 -07:00
Aaron Patterson 702b8e3107 golf down ancestor caching 2023-10-24 14:23:17 -07:00
Jemma Issroff ee8299864f
Remove erroneous test_code.rb file 2023-10-24 16:35:07 -03:00
Jemma Issroff 10756f3dea [ruby/prism] Add PostExecutionNode to pm_scope_node_init
https://github.com/ruby/prism/commit/88fe6213af
2023-10-24 18:34:36 +00:00
Aaron Patterson e71f343a99 Addressing feedback 2023-10-24 10:52:06 -07:00
Aaron Patterson 884c3195d9 Update benchmark/vm_ivar_ic_miss.yml
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-10-24 10:52:06 -07:00
Aaron Patterson dc81432482 updating bindgen 2023-10-24 10:52:06 -07:00
Aaron Patterson 54230dea1b Don't cache on platforms without mmap
We're only going to create a redblack tree on platforms that have mmap
2023-10-24 10:52:06 -07:00
Aaron Patterson a3f66e09f6 geniv objects can become too complex 2023-10-24 10:52:06 -07:00
Aaron Patterson caf6a72348 remove IV limit / support complex shapes on classes 2023-10-24 10:52:06 -07:00
Aaron Patterson 27c7531939 increase the maximum number of ivs 2023-10-24 10:52:06 -07:00
Aaron Patterson 84e4453436 Use a functional red-black tree for indexing the shapes
This is an experimental commit that uses a functional red-black tree to
create an index of the ancestor shapes.  It uses an Okasaki style
functional red black tree:

  https://www.cs.tufts.edu/comp/150FP/archive/chris-okasaki/redblack99.pdf

This tree is advantageous because:

* It offers O(n log n) insertions and O(n log n) lookups.
* It shares memory with previous "versions" of the tree

When we insert a node in the tree, only the parts of the tree that need
to be rebalanced are newly allocated.  Parts of the tree that don't need
to be rebalanced are not reallocated, so "new trees" are able to share
memory with old trees.  This is in contrast to a sorted set where we
would have to duplicate the set, and also resort the set on each
insertion.

I've added a new stat to RubyVM.stat so we can understand how the red
black tree increases.
2023-10-24 10:52:06 -07:00
Hiroshi SHIBATA 5c4978c11c [rubygems/rubygems] Handle empty array
https://github.com/rubygems/rubygems/commit/7c0afdd9af
2023-10-24 16:31:43 +00:00
Nobuyoshi Nakada c86c6a84f5 [Bug #19968] Revert RBS revision to test
This reverts the commits for the master branch of RBS:

- commit f717faac632dd8664d0967f8e639b84d5d032854: "Update rbs
  revision to test"

    The target revision to test is in master branch, not for 3.2.x.

- commit 9e93af5329f35092c3de3ea37d4e9e181b800bb2: "Skip RBS
  `RbConfig::TOPDIR` test that is `nil` before installation"

    RbConfig_test.rb is not updated in 3.2.x branch.
2023-10-24 22:59:09 +09:00
dependabot[bot] c44d65427e Bump ossf/scorecard-action from 2.3.0 to 2.3.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](483ef80eb9...0864cf1902)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 20:34:33 -07:00
Nobuyoshi Nakada ccd18d0557
Clean up temporary file, wc.input [ci skip] 2023-10-24 12:30:10 +09:00
Nobuyoshi Nakada 92f29349d5
Use extquote instead of literal tabs [ci skip] 2023-10-24 12:30:09 +09:00
Yusuke Endoh 25c1204fe7 rb_getaddrinfo should return EAI_AGAIN instead of EAGAIN 2023-10-24 12:22:53 +09:00
Yusuke Endoh c08020254e Indent critical regions with blocks
Cosmetic change per ko1's preference
2023-10-24 12:22:53 +09:00
Yusuke Endoh acd774263c Do not use pthread on mingw 2023-10-24 12:22:53 +09:00
Yusuke Endoh 16d6a22757 Make rb_getnameinfo interruptible
Same as previous commit for rb_getnameinfo.
2023-10-24 12:22:53 +09:00