Age | Commit message (Collapse) | Author |
|
Values defined for OPT_THREADED_CODE are 0,1,2. However, 1,2,3 are set in workflow. It seems that case 3 does not exist, so 0 is specified instead.
Co-authored-by: jinroq <jinroq@users.noreply.github.com>
|
|
This reverts commit ab228bd0844758a1c444e39030c153874adf9120.
|
|
This patch adds `int line_count` field to `rb_ast_body_t` structure.
Instead, we no longer cast `script_lines` to Fixnum.
## Background
Ref https://github.com/ruby/ruby/pull/10618
In the PR above, we have decoupled IMEMO from `rb_ast_t`.
This means we could lift the five-words-restriction of the structure
that forced us to unionize `rb_ast_t *` and `FIXNUM` in one field.
## Relating refactor
- Remove the second parameter of `rb_ruby_ast_new()` function
## Attention
I will remove a code that assigns -1 to line_count, in `rb_binding_add_dynavars()`
of vm.c, because I don't think it is necessary.
But I will make another PR for this so that we can atomically revert
in case I was wrong (See the comment on the code)
|
|
|
|
Even though unused, it's supposed to take a pointer like the C side
expects.
|
|
Because of the way things are sequenced, it doesn't work properly during
auto-compaction.
|
|
Previously, the update was done in the ISEQ callback. That effectively
never updated anything because the callback itself is given an intact
reference, so it could update its content, and `rb_gc_location(iseq)`
never returned a new address. Update the whole table once in the YJIT
root instead.
|
|
This reverts commit 444553b528a54a97e539de212ffc4c6466a6db20.
At least it should no longer timeout.
|
|
.github/actions/setup/directories/action.yml sets GNUMAKEFLAGS. Having
-j here is rather harmful.
Partly reverts f8dad616c2ee2d83b3162da8d86865b0f2a782de.
|
|
miniruby is used by tool/runruby.rb, so we need to ensure we don't rb_bug
when RUBY_GC_LIBRARY_PATH is set so we can run tests using the make
commands. This commit changes it to warn instead.
|
|
|
|
|
|
https://github.com/ruby/prism/commit/c9edeef91a
|
|
|
|
Fixes:
warning: old-style function definition [-Wold-style-definition]
|
|
|
|
|
|
https://github.com/ruby/prism/commit/9b61f6fdb3
|
|
https://github.com/ruby/prism/commit/be21a1bd1d
|
|
https://github.com/ruby/ruby/actions/runs/8852277192/job/24310631888
https://github.com/ruby/ruby/actions/runs/8851325573/job/24307638329
This seems like an existing, separate issue from what we're currently
investigating. The `iseq->body->jit_entry` setup is not Ractor-safe?
Let me suppress this for now and revisit this after resolving the
ongoing issue.
|
|
https://github.com/ruby/prism/commit/450541d2c3
|
|
(https://github.com/ruby/irb/pull/934)
Since commands can't be chained with methods, their return values are
not intended to be used. But if IRB keeps storing command return values
as the last value, and print them, users may rely on such implicit
behaviour.
So to avoid such confusion, this commit suppresses command's
return values. It also updates some commands that currently rely on
this implicit behaviour.
https://github.com/ruby/irb/commit/fa96bea76f
|
|
RFC 2986, section 4.1 only defines version 1 for CSRs. This version
is encoded as a 0. Starting with OpenSSL 3.3, setting the CSR version
to anything but 1 fails.
Do not attempt to generate a CSR with invalid version (which now fails)
and invalidate the CSR in test_sign_and_verify_rsa_sha1 by changing its
subject rather than using an invalid version.
This commit fixes the following error.
```
2) Error: test_version(OpenSSL::TestX509Request): OpenSSL::X509::RequestError:
X509_REQ_set_version: passed invalid argument
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `version='
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `issue_csr'
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:43:in
`test_version'
40: req = OpenSSL::X509::Request.new(req.to_der)
41: assert_equal(0, req.version)
42:
=> 43: req = issue_csr(1, @dn, @rsa1024, OpenSSL::Digest.new('SHA256'))
44: assert_equal(1, req.version)
45: req = OpenSSL::X509::Request.new(req.to_der)
46: assert_equal(1, req.version)
```
https://github.com/ruby/openssl/commit/c06fdeb091
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The error message is often long, so using a small buffer could cause it
to be truncated. rb_bug also has a 256 byte message buffer, so it could
also be truncated.
|
|
|
|
Noticed this small type while reading the docs.
|
|
Add `zero?` as a related method
|
|
as names
(https://github.com/ruby/irb/pull/932)
This will save users some heads scratching when they try to register a
command with a string name and found that it doesn't work.
I also rewrote converted custom command tests into integration tests to
make test setup/cleanup easier.
https://github.com/ruby/irb/commit/a91a212dbe
|
|
Parser should not depend on functions defiend on "ruby_parser.c".
|
|
|
|
|
|
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.2 to 3.25.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/8f596b4ae3cb3c588a5c46780b86dd53fef16c52...d39d31e687223d841ef683f52467bd88e9b21c14)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
This patch removes the `VALUE flags` member from the `rb_ast_t` structure making `rb_ast_t` no longer an IMEMO object.
## Background
We are trying to make the Ruby parser generated from parse.y a universal parser that can be used by other implementations such as mruby.
To achieve this, it is necessary to exclude VALUE and IMEMO from parse.y, AST, and NODE.
## Summary (file by file)
- `rubyparser.h`
- Remove the `VALUE flags` member from `rb_ast_t`
- `ruby_parser.c` and `internal/ruby_parser.h`
- Use TypedData_Make_Struct VALUE which wraps `rb_ast_t` `in ast_alloc()` so that GC can manage it
- You can retrieve `rb_ast_t` from the VALUE by `rb_ruby_ast_data_get()`
- Change the return type of `rb_parser_compile_XXXX()` functions from `rb_ast_t *` to `VALUE`
- rb_ruby_ast_new() which internally `calls ast_alloc()` is to create VALUE vast outside ruby_parser.c
- `iseq.c` and `vm_core.h`
- Amend the first parameter of `rb_iseq_new_XXXX()` functions from `rb_ast_body_t *` to `VALUE`
- This keeps the VALUE of AST on the machine stack to prevent being removed by GC
- `ast.c`
- Almost all change is replacement `rb_ast_t *ast` with `VALUE vast` (sorry for the big diff)
- Fix `node_memsize()`
- Now it includes `rb_ast_local_table_link`, `tokens` and script_lines
- `compile.c`, `load.c`, `node.c`, `parse.y`, `proc.c`, `ruby.c`, `template/prelude.c.tmpl`, `vm.c` and `vm_eval.c`
- Follow-up due to the above changes
- `imemo.{c|h}`
- If an object with `imemo_ast` appears, considers it a bug
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
Types like `Type::CString` really only assert that at one point the object had
its class field equal to `String`. Once a singleton class is created for any
strings, the type makes no assertion about any class field anymore, and becomes
the same as `Type::TString`.
Previously, the `--yjit-verify-ctx` option wasn't allowing objects of these
kind that have have singleton classes to pass verification even though the code
generators handle it just fine.
Found through `ruby/spec`.
|
|
The GC is initialized by this point, so we can use xcalloc instead of
ruby_mimcalloc.
|
|
|
|
We have some places that already use `bundle config auto_install true`,
ie:
https://github.com/technicalpickles/rubygems/blob/7a144f3374f6a400cc9832f072dc1fc0bca8c724/bundler/lib/bundler/cli.rb#L11
This applies the same logic (copy and pasted) to happen when you
`require "bundler/setup"`.
https://github.com/rubygems/rubygems/commit/bb3c922341
|
|
https://github.com/ruby/prism/commit/7fc7e13476
|
|
|