86825 Commits

Author SHA1 Message Date
Peter Zhu
6fc83118bb Fix Makefile.in for non GNUmake
On OpenBSD the Makefile errors with:

    Using $< in a non-suffix rule context is a GNUmake idiom
2024-07-11 15:49:14 -04:00
Kevin Newton
cfaa3e9311 [ruby/prism] Bump typecheck dependencies to fix CI
https://github.com/ruby/prism/commit/c7a4a90ee8
2024-07-11 19:46:51 +00:00
Kevin Newton
21b4c14971 [ruby/prism] (ruby_parser) Handle bare string in implicit concat
https://github.com/ruby/prism/commit/afc7c9344a
2024-07-11 19:46:50 +00:00
Kevin Newton
3c3be9c6b2 [ruby/prism] (ruby_parser) Match match3 nodes for regular expressions
https://github.com/ruby/prism/commit/47cb73ce69
2024-07-11 19:46:50 +00:00
Kevin Newton
4c696597b7 [ruby/prism] (ruby_parser) Reverse associativity of and and or nodes
https://github.com/ruby/prism/commit/073e8ba307
2024-07-11 19:46:49 +00:00
Koichi Sasada
43aee3393d fix defined?(@ivar) with Ractors
`defined?(@ivar)` on the non main Ractor has two issues:

1. raising an exception

```ruby
class C
  @iv1 = []
  def self.defined_iv1 = defined?(@iv1)
end

Ractor.new{
  p C.defined_iv1
  #=> can not get unshareable values from instance variables of classes/modules from non-main Ractors (Ractor::IsolationError)
}.take
```

-> Do not raise an exception but return `"instance-variable"` because
it is defined.

2. returning `"instance-variable"` if there is not defined.

```
class C
  # @iv2 is not defined
  def self.defined_iv2 = defined?(@iv2)
end

Ractor.new{
  p C.defined_iv2 #=> "instance-variable"
}.take
```

-> returns `nil`
2024-07-12 04:43:14 +09:00
Ivo Anjo
ef563a696d Minor: Fix typo in bug name
This confused me for a few minutes -- the testcase for
https://bugs.ruby-lang.org/issues/14834 was mistyped in the file name,
as well as once in the source.

E.g. in some cases it was
`one-four-three-eight-four` instead of
`one-four-eight-three-four`.
2024-07-11 15:18:40 -04:00
Maxime Chevalier-Boisvert
a58e3305ce
YJIT: remove doc/yjit/yjit_hacking.md (#11153)
Document is 3 years old and out of date
2024-07-11 19:17:40 +00:00
Maxime Chevalier-Boisvert
3fbf9df39a
YJIT: increase context cache size to 1024 redux (#11140)
* YJIT: increase context cache size to 1024 redux

* Move context hashing code outside of unsafe block

* Avoid allocating large table on the stack, which would cause a stack overflow

Co-authored by Alan Wu @XrXr
2024-07-11 19:01:05 +00:00
Kevin Newton
1f6aeadc82 [PRISM] Fix Windows 2015 segfault 2024-07-11 14:25:54 -04:00
Kevin Newton
ac093f5a06 [PRISM] Fix up shareable constant casting 2024-07-11 14:25:54 -04:00
Kevin Newton
c1df15c3e6 [PRISM] Use node ids for error highlight 2024-07-11 14:25:54 -04:00
Kevin Newton
0006fb1e9e [PRISM] Revert incorrectly merged gemfile 2024-07-11 14:25:54 -04:00
Stan Lo
be4589df80 [ruby/prism] Prevent optional block parameter from accepting certain prefixed values
This commit prevents the following unary operators from being accepted
as the value prefix of a block's optional parameter:

- `+`
- `-`
- `~`
- `!`

For example, `f { |a = +b| }` will now raise a syntax error.

https://github.com/ruby/prism/commit/3024bee60c

Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2024-07-11 14:25:54 -04:00
Kevin Newton
aa473489a2 [ruby/prism] Various cleanup for initializers and typechecks
https://github.com/ruby/prism/commit/86cf82794a
2024-07-11 14:25:54 -04:00
Kevin Newton
2bf9ae3fa1 [ruby/prism] Add node ids to nodes
https://github.com/ruby/prism/commit/bf16ade7f9
2024-07-11 14:25:54 -04:00
Kevin Newton
39dcfe26ee [ruby/prism] Move Node#type and Node::type documentation
https://github.com/ruby/prism/commit/08a71f6259
2024-07-11 14:25:54 -04:00
Kevin Newton
32090e2b8d [ruby/prism] Add Node#breadth_first_search
https://github.com/ruby/prism/commit/1ffb141199
2024-07-11 14:25:54 -04:00
Kevin Newton
aca42a2478 [ruby/prism] Expose common flags in inspect output
https://github.com/ruby/prism/commit/d0143865c2
2024-07-11 14:25:54 -04:00
Kevin Newton
687be43c79 [ruby/prism] Expose flags on every node type
https://github.com/ruby/prism/commit/9f12a56fd6
2024-07-11 14:25:54 -04:00
Kevin Newton
ca48fb76fb [ruby/prism] Move location to second position for node initializers
https://github.com/ruby/prism/commit/4cc0eda4ca
2024-07-11 14:25:54 -04:00
Kevin Newton
678dd769e5 [ruby/prism] Reconfigure error tests
https://github.com/ruby/prism/commit/fb7e1ebb7f
2024-07-11 14:25:54 -04:00
Maxime Chevalier-Boisvert
c0ad0c3e43
Update yjit.md, explain how to run a single test with test-all (#11151) 2024-07-11 17:02:01 +00:00
Peter Zhu
9962e39547 Make shared GC job in ubuntu.yml use a shared GC 2024-07-11 11:38:00 -04:00
Peter Zhu
d0dfd963af Remove SHARED_GC job from compilers.yml
It's a duplicate of the one in ubuntu.yml
2024-07-11 11:38:00 -04:00
Jeremy Evans
c698180e68 [ruby/logger] Add reraise_write_errors keyword argument to Logger and LogDevice
This allows the user to specify exception classes to treat as regular
exceptions instead of being swallowed.  Among other things, it is
useful for having Logger work with Timeout.

Fixes Ruby Bug 9115.

https://github.com/ruby/logger/commit/436a7d680f
2024-07-11 15:25:17 +00:00
Peter Zhu
a0469a4788 Rename gc/gc_impl.c to gc/default.c
Changing the name makes it clear that this is the default GC in Ruby.
2024-07-11 09:09:47 -04:00
Peter Zhu
e5d12f9cce Move gc_impl.c to gc/gc_impl.c
This commit creates a new directory `gc` to put different GC
implementations and moves the default GC from gc_impl.c to gc/gc_impl.c.
The default GC can be easily switched using the `BUILTIN_GC` variable
in Makefile.in.
2024-07-11 09:09:47 -04:00
Jeremy Daer
e1a034cb96
IBM864 single-byte transcoding (#10518)
Include € euro sign from CCSID 864
2024-07-11 17:03:14 +09:00
git
a1f7432550 Update bundled gems list as of 2024-07-10 2024-07-11 06:59:45 +00:00
Jean Boussier
3de0e343e2 Do not warn about extra format argument when passed as keywords
[Bug #20593]

It's fairly common to use `format` to interpolate a number of values
into a user provided strings.

The arguments not matching are a problem when they are positional,
but when they are named, it's absolutely fine and we shouldn't
emit a warning.
2024-07-11 07:39:50 +02:00
João Pinheiro
72732af47e [ruby/open-uri] document max_redirects option
https://github.com/ruby/open-uri/commit/4a247e5ca1
2024-07-11 04:49:59 +00:00
João Pinheiro
e62a0126cd [ruby/open-uri] apply default max_redirects
https://github.com/ruby/open-uri/commit/5d29e626bc
2024-07-11 04:49:59 +00:00
Yusuke Endoh
e1238a1fab Enumerable#all?: Stop optimizing when a given block is not optimizable
This is a follow up to 182822683f86c8f8d63b05765addf5a04d112aa2.

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
2024-07-11 12:28:23 +09:00
dependabot[bot]
724d95a713 Bump ruby/setup-ruby from 1.186.0 to 1.187.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.186.0 to 1.187.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](2a9a743e19...161cd54b69)

---
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>
2024-07-11 12:03:49 +09:00
Dmitriy Ivliev
6dc0086d20 [rubygems/rubygems] fix s3 source configuration issue
https://github.com/rubygems/rubygems/commit/356726bd1a
2024-07-11 02:27:46 +00:00
Evgeni Golov
bc1b4235fb [ruby/net-http] implement talking SSL to the proxy too
https://bugs.ruby-lang.org/issues/16482

https://github.com/ruby/net-http/commit/ae2d83f88b
2024-07-11 01:56:08 +00:00
fatkodima
70bdc0f777 [ruby/net-http] Add ability to configure default settings for new connections
https://github.com/ruby/net-http/commit/fed3dcd0c2
2024-07-11 01:51:03 +00:00
MSP-Greg
9f4b45fbf7 [ruby/net-http] test_https.rb - fix test_session_reuse_but_expire
https://github.com/ruby/net-http/commit/5544243c41
2024-07-11 01:22:10 +00:00
MSP-Greg
d605fb54cf [ruby/net-http] net/http.rb - derive SSL_IVNAMES from SSL_ATTRIBUTES
https://github.com/ruby/net-http/commit/7191bb923b
2024-07-11 01:10:08 +00:00
Hiroshi SHIBATA
9a5e3a4007 Removed WEBrick and that tests
We can handle uri, time and others without `make test-all` dependencies now.
2024-07-11 09:23:16 +09:00
Jeremy Evans
bfba96a106 Avoid a hash allocation when keyword splatting empty hash when calling ruby2_keywords method
Treat this similar to keyword splatting nil, using goto ignore.
However, keep previous behavior if the method accepts a keyword
splat, to avoid double hash allocation.

This also can avoid an array allocation when calling a method
that doesn't have any splat parameters but supports literal
keyword parameters, because ignore_keyword_hash_p was not
ignoring the keyword hash in that case.

This change doesn't remove the empty ruby2_keywords hash from
the array, which caused an assertion failure if the method
being called accepted keywords in some cases.  Modify the
assertion to handle this case.  An alternative approach would
add a flag to the args struct so the args_argc calculation could
handle this case and report the correct argc, but such an approach
would likely be slower.
2024-07-10 16:38:06 -07:00
git
8c69caa495 * append newline at EOF. [ci skip] 2024-07-10 23:06:20 +00:00
Hiroshi SHIBATA
840f7ebfde [ruby/net-http] Commented out unfinished chunked test
https://github.com/ruby/net-http/commit/6376592cb4
2024-07-10 23:06:10 +00:00
Hiroshi SHIBATA
492b505d95 [ruby/net-http] Removed needless warning
https://github.com/ruby/net-http/commit/d867edc0fe
2024-07-10 23:06:10 +00:00
Hiroshi SHIBATA
b11aba503b [ruby/net-http] Split POST test because new dummy server can't handle continuouse POST request
https://github.com/ruby/net-http/commit/54a99b9f0c
2024-07-10 23:06:09 +00:00
Hiroshi SHIBATA
e77bc17e5d [ruby/net-http] Write log after server start, not handling request
https://github.com/ruby/net-http/commit/205bac757a
2024-07-10 23:06:09 +00:00
Hiroshi SHIBATA
6428536146 [ruby/net-http] Split test class because TCPServer couldn't accept localhost and 127.0.0.1 both
https://github.com/ruby/net-http/commit/749a1b3197
2024-07-10 23:06:08 +00:00
Hiroshi SHIBATA
4e6463ad7a [ruby/net-http] Support chunked data and fixed test failure with multipart/form-data
https://github.com/ruby/net-http/commit/b38c2795a9
2024-07-10 23:06:08 +00:00
Hiroshi SHIBATA
87a45af105 [ruby/net-http] Removed server-side log test
https://github.com/ruby/net-http/commit/9c16c383ce
2024-07-10 23:06:07 +00:00