Commit graph

18546 commits

Author SHA1 Message Date
eileencodes
54bbf9a6e9 [PRISM] Implement MatchLastLineNode
This PR implements `MatchLastLineNode` for Prism.

Related: ruby/prism#1335
2023-09-27 18:36:23 -04:00
Jeremy Evans
62181e17da Make {Queue,SizedQueue}#freeze raise TypeError
Fixes [Bug #17146]
2023-09-27 19:57:50 +01:00
Kevin Newton
224e76ada7 Include recently added parse_test code in rename 2023-09-27 13:57:38 -04:00
Kevin Newton
3d0a46796b Rename YARP symbols to prism 2023-09-27 13:57:38 -04:00
Kevin Newton
4f73a7c2f7 Sync to prism rename commits 2023-09-27 13:57:38 -04:00
Kevin Newton
8ab56869a6 Rename YARP filepaths to prism filepaths 2023-09-27 13:57:38 -04:00
Kevin Newton
7e0971eb5d Update YARP build targets 2023-09-27 12:10:23 -04:00
Kevin Newton
b18e05b18f [ruby/yarp] Split up compiler versus visitor
2e6baa3f19
2023-09-27 12:10:23 -04:00
Kevin Newton
3cec94624b Rename compiler test to iseq test 2023-09-27 12:10:23 -04:00
eileencodes
2bc243b3dc [YARP] Implement regex flags
This fixes the TODO in the code that was passing 0 instead of the regex
flags.
2023-09-27 11:25:53 -04:00
Jemma Issroff
2000cf9183
[YARP] Implemented BlockArgumentNode (#8499) 2023-09-27 11:08:54 -04:00
Nobuyoshi Nakada
5b36c11e21 Out of place jumps are valid in defined? 2023-09-27 21:53:01 +09:00
Nobuyoshi Nakada
29e5fca718 Syntax check of retry in the parser 2023-09-27 21:53:01 +09:00
Nobuyoshi Nakada
ff8278e52c Fix error token location 2023-09-27 21:53:01 +09:00
Nobuyoshi Nakada
9fd342f8d2 Block exits are now syntax error in ripper 2023-09-27 21:53:01 +09:00
Nobuyoshi Nakada
e1250a5f97 Syntax check of block exits in the parser 2023-09-27 21:53:01 +09:00
Kevin Newton
705bd6439d [ruby/yarp] Ensure newlines are sorted in newline test
3bfefc44c4
2023-09-26 18:23:59 +00:00
Kevin Newton
a436805d3b [ruby/yarp] Remove visitor usage to not rely on overriding visit
6903860981
2023-09-26 18:07:55 +00:00
Haldun Bayhantopcu
3f511a1d09 [ruby/yarp] Check predicate of while and until
f57a6066b5
2023-09-26 15:08:25 +00:00
elfham
3f1cfc43bd [ruby/reline] Fix config.rb to File.expand_path $include path in
inputrc
(https://github.com/ruby/reline/pull/592)

* Fix config.rb to File.expand_path $include path in inputrc

* fix bug of test_include_expand_path on Windows

4d34e52d0b
2023-09-26 13:08:20 +00:00
tomoya ishida
c2c0a083f0 [ruby/irb] Disable pager in show-source test
(https://github.com/ruby/irb/pull/720)

5669efa4c1
2023-09-26 10:06:17 +00:00
Nobuyoshi Nakada
6d7730ab98
Run crash report test processes without RUBY_ON_BUG
These processes are to be crashed, avoid running debugger.
2023-09-26 17:25:08 +09:00
Yusuke Endoh
8233572d45 Prevent warnings: "unused literal ignored"
```
[24688/26146] TestParse#test_named_capture_in_block(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: unused literal ignored
(eval at /home/chkbuild/chkbuild/tmp/build/20230926T063004Z/ruby/test/ruby/test_parse.rb:999):1: warning: possibly useless use of + in void context
 = 0.00 s
```
2023-09-26 17:01:24 +09:00
Yusuke Endoh
55a297c840 Prevent warnings: "unused literal ignored"
The test emits many warnings under `RUBYOPT=-w`

```
[22699/26146] YARP::CompilerTest#test_FloatNode<compiled>:1: warning: unused literal ignored
<compiled>:1: warning: unused literal ignored
<compiled>:1: warning: unused literal ignored
<compiled>:1: warning: unused literal ignored
 = 0.00 s
```
2023-09-26 16:42:47 +09:00
Nobuyoshi Nakada
6b66b5fded [Bug #19902] Update the coderange regarding the changed region 2023-09-26 15:35:40 +09:00
Nobuyoshi Nakada
f0d8278607
Run crash report test processes without RUBY_ON_BUG
These processes are to be crashed, avoid running debugger.
2023-09-26 14:28:49 +09:00
dependabot[bot]
78cb795491 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.81 to 0.9.82.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.81...v0.9.82)

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

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

780fb19b03
2023-09-25 18:16:47 +00:00
dependabot[bot]
78af64d08f [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.81 to 0.9.82.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.81...v0.9.82)

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

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

f48d03aabd
2023-09-25 18:16:03 +00:00
Jun Aruga
295862e22a [ruby/zlib] Workaround: Fix test failures on Ubuntu jammy s390x.
This commit fixes the test failures on the zlib in Ubuntu jammy s390x.

According to the <https://packages.ubuntu.com/jammy-updates/zlib1g> -
`zlib_1.2.11.dfsg-2ubuntu9.2.debian.tar.xz`,
the zlib deb package is applying the patch 410.patch (madler/zlib#410), and
configured by `./configure --dfltcc` on Ubuntu jammy s390x. The `--dfltcc`
is to enable the deflate algorithm in hardware.

It produces a different (but still valid) compressed byte stream, and causes
the test failures in ruby/zlib. As a workaround, set the environment variable
`DFLTCC=0` disabling the implementation in zlib on s390x to the failing tests.

Note we need to test in a child Ruby process with `assert_separately` to test
on the `DFLTCC=0` set by the parent Ruby process.

9f3b9c470c
2023-09-25 17:59:04 +00:00
Nobuyoshi Nakada
bab01d284c [Feature #19790] Rename BUGREPORT_PATH as CRASH_REPORT 2023-09-25 22:57:28 +09:00
Nobuyoshi Nakada
7e2775b057 Invoke the command when RUBY_BUGREPORT_PATH starts with | 2023-09-25 22:57:28 +09:00
Nobuyoshi Nakada
89b3c111ff Redirect to RUBY_BUGREPORT_PATH file 2023-09-25 22:57:28 +09:00
Nobuyoshi Nakada
94d7c70801
Fix test thread leakage 2023-09-24 09:50:01 +09:00
Adam Hess
c42261059d [Bug #19901]
fix leak in module clone

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2023-09-23 23:10:46 +02:00
Peter Zhu
61a2e9450c Fix memory leak in Hash#rehash for ST hashes
We need to free the old ST table in Hash#rehash.

Co-authored-by: Adam Hess <adamhess1991@gmail.com>
2023-09-23 11:24:41 -04:00
Haldun Bayhantopcu
6de1a9238b [ruby/yarp] Check class name to be a constant path node or a constant read node
fd7c44f13f
2023-09-22 17:08:04 +00:00
Jemma Issroff
9abaf392b1
Resync yarp (#8498)
* [YARP] Reject numbered parameters in block parameters

* [YARP] Do not allow BEGIN except the toplevel

---------

Co-authored-by: Haldun Bayhantopcu <haldun@github.com>
2023-09-22 12:05:47 -04:00
Haldun Bayhantopcu
c54e225f34 [ruby/yarp] Introduce YP_TOKEN_METHOD_NAME
e855bf415c
2023-09-22 15:47:56 +00:00
Nobuyoshi Nakada
ea5f8e123c
Magical wait to get rid of deadlock on macOS 2023-09-22 23:45:54 +09:00
Kevin Newton
a5ae5f71fd [ruby/yarp] Fix listener leave event order
1e6e264836
2023-09-22 14:07:48 +00:00
Adam Hess
8b236e0c66 [Bug #19896]
fix memory leak in vm_method

This introduces a unified reference_count to clarify who is referencing a method.
This also allows us to treat the refinement method as the def owner since it counts itself as a reference

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2023-09-22 09:44:58 -04:00
Stan Lo
f59b488b5a [ruby/irb] Page show_source's output
(https://github.com/ruby/irb/pull/719)

3cedc5cb62
2023-09-22 13:00:32 +00:00
Nobuyoshi Nakada
c8c35ded74
[YARP] Suppress constant redefinition warning
```
<compiled>:1: warning: already initialized constant Bar
test/yarp/compiler_test.rb:139: warning: previous definition of Bar was here
```
2023-09-22 19:41:52 +09:00
Benoit Daloze
50e3b27db7 [ruby/zlib] Add truffleruby-head in CI
* The latest release does not have this fix:
  c77f8bb35d

8abc80b994
2023-09-22 07:29:22 +00:00
Matt Valentine-House
bf129370d3 [YARP] Implement ConstantPathTargetNode
Co-Authored-By: kddnewton <kevin.newton@shopify.com>
2023-09-21 23:00:49 +01:00
Jemma Issroff
a7b3217fff
[YARP] Add tests for popped instructions (#8494) 2023-09-21 15:28:08 -04:00
Samuel Giddins
39a6272cf4 [rubygems/rubygems] Fix safe marshal test on jruby
Allow for variance in order of dumped ivars, fix by setting the disallowed ivar on an object that will have no other ivars so the index is consistent

ccb8f42753
2023-09-21 19:08:11 +00:00
Samuel Giddins
812c8196b6 [rubygems/rubygems] Remove usage of Dir.chdir that just execute a subprocess
Preferring instead to spawn the subprocess in the correct directory

ad5abd6a45
2023-09-21 18:30:37 +00:00
Samuel Giddins
02fa2acbde [rubygems/rubygems] Freeze more strings in generated gemspecs
Specifically, this will have frozen string literals for:
- Gem platform tuple entries
- Gem::Version strings
- Gem::Specification#installed_by_version
- Dependency requirement strings

6195da5bdb
2023-09-21 18:25:04 +00:00
Jun Aruga
7f407e0240 [ruby/openssl] Fix test_pkey_ec.rb on FIPS.
d07183f639
2023-09-21 18:04:56 +00:00