Skip to content

Commit

Permalink
Merge commit '3ac6a03b2e16da1df818227be02c5129c9804b14' into Ractor-L…
Browse files Browse the repository at this point in the history
…ocal-GC-version-2
  • Loading branch information
rm155 committed Apr 4, 2024
2 parents 3a5ecae + 3ac6a03 commit 839b75d
Show file tree
Hide file tree
Showing 142 changed files with 3,551 additions and 2,881 deletions.
7 changes: 0 additions & 7 deletions .github/CODEOWNERS

This file was deleted.

13 changes: 13 additions & 0 deletions .github/auto_request_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
files:
'yjit*': [team:yjit]
'yjit/**/*': [team:yjit]
'yjit/src/cruby_bindings.inc.rs': []
'doc/yjit/*': [team:yjit]
'bootstraptest/test_yjit*': [team:yjit]
'test/ruby/test_yjit*': [team:yjit]
options:
ignore_draft: true
# This currently doesn't work as intended. We want to skip reviews when only
# cruby_bingings.inc.rs is modified, but this skips reviews even when other
# yjit files are modified as well. To be enabled after fixing the behavior.
#last_files_match_only: true
19 changes: 19 additions & 0 deletions .github/workflows/auto_request_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Auto Request Review
on:
pull_request_target:
types: [opened, ready_for_review, reopened]

permissions:
contents: read

jobs:
auto-request-review:
name: Auto Request Review
runs-on: ubuntu-latest
if: ${{ github.repository == 'ruby/ruby' && github.base_ref == 'master' }}
steps:
- name: Request review based on files changes and/or groups the author belongs to
uses: necojackarc/auto-request-review@e89da1a8cd7c8c16d9de9c6e763290b6b0e3d424 # v0.13.0
with:
# scope: public_repo
token: ${{ secrets.MATZBOT_GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The following default gems are updated.
* fiddle 1.1.3
* io-console 0.7.2
* irb 1.12.0
* json 2.7.2
* net-http 0.4.1
* prism 0.24.0
* rdoc 6.6.3.1
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[![Actions Status: RJIT](https://github.com/ruby/ruby/workflows/RJIT/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"RJIT")
[![Actions Status: Ubuntu](https://github.com/ruby/ruby/workflows/Ubuntu/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"Ubuntu")
[![Actions Status: Windows](https://github.com/ruby/ruby/workflows/Windows/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"Windows")
[![AppVeyor status](https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/master?svg=true)](https://ci.appveyor.com/project/ruby/ruby/branch/master)
[![Travis Status](https://app.travis-ci.com/ruby/ruby.svg?branch=master)](https://app.travis-ci.com/ruby/ruby)

# What is Ruby?
Expand Down
30 changes: 3 additions & 27 deletions ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,29 +183,6 @@ node_find(VALUE self, const int node_id)

extern VALUE rb_e_script;

VALUE
rb_script_lines_for(VALUE path, bool add)
{
VALUE hash, lines;
ID script_lines;
CONST_ID(script_lines, "SCRIPT_LINES__");
if (!rb_const_defined_at(rb_cObject, script_lines)) return Qnil;
hash = rb_const_get_at(rb_cObject, script_lines);
if (!RB_TYPE_P(hash, T_HASH)) return Qnil;
if (add) {
rb_hash_aset(hash, path, lines = rb_ary_new());
}
else if (!RB_TYPE_P((lines = rb_hash_lookup(hash, path)), T_ARRAY)) {
return Qnil;
}
return lines;
}
static VALUE
script_lines(VALUE path)
{
return rb_script_lines_for(path, false);
}

static VALUE
node_id_for_backtrace_location(rb_execution_context_t *ec, VALUE module, VALUE location)
{
Expand Down Expand Up @@ -267,7 +244,7 @@ ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body, VALUE keep_script
rb_raise(rb_eArgError, "cannot get AST for method defined in eval");
}

if (!NIL_P(lines) || !NIL_P(lines = script_lines(path))) {
if (!NIL_P(lines)) {
node = rb_ast_parse_array(lines, keep_script_lines, error_tolerant, keep_tokens);
}
else if (e_option) {
Expand Down Expand Up @@ -551,16 +528,15 @@ node_children(rb_ast_t *ast, const NODE *node)
name[1] = (char)RNODE_BACK_REF(node)->nd_nth;
name[2] = '\0';
return rb_ary_new_from_args(1, ID2SYM(rb_intern(name)));
case NODE_MATCH:
return rb_ary_new_from_args(1, rb_node_regx_string_val(node));
case NODE_MATCH2:
if (RNODE_MATCH2(node)->nd_args) {
return rb_ary_new_from_node_args(ast, 3, RNODE_MATCH2(node)->nd_recv, RNODE_MATCH2(node)->nd_value, RNODE_MATCH2(node)->nd_args);
}
return rb_ary_new_from_node_args(ast, 2, RNODE_MATCH2(node)->nd_recv, RNODE_MATCH2(node)->nd_value);
case NODE_MATCH3:
return rb_ary_new_from_node_args(ast, 2, RNODE_MATCH3(node)->nd_recv, RNODE_MATCH3(node)->nd_value);
case NODE_MATCH:
case NODE_LIT:
return rb_ary_new_from_args(1, RNODE_LIT(node)->nd_lit);
case NODE_STR:
case NODE_XSTR:
return rb_ary_new_from_args(1, rb_node_str_string_val(node));
Expand Down
6 changes: 3 additions & 3 deletions bootstraptest/test_literal_suffix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
'1.0000000000000000001r'

assert_equal 'unexpected local variable or method, expecting end-of-input',
%q{begin eval('1ir', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\A:(?:\d+:)? syntax error,|\^) (.*)/, 1] end}
%q{begin eval('1ir', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error,) (.*)/, 1]; end}
assert_equal 'unexpected local variable or method, expecting end-of-input',
%q{begin eval('1.2ir', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\A:(?:\d+:)? syntax error,|\^) (.*)/, 1] end}
%q{begin eval('1.2ir', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error,) (.*)/, 1]; end}
assert_equal 'unexpected local variable or method, expecting end-of-input',
%q{begin eval('1e1r', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\A:(?:\d+:)? syntax error,|\^) (.*)/, 1] end}
%q{begin eval('1e1r', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error,) (.*)/, 1]; end}
2 changes: 1 addition & 1 deletion bootstraptest/test_syntax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ def lines
}
def assert_syntax_error expected, code, message = ''
assert_match /^#{Regexp.escape(expected)}/,
"begin eval(%q{#{code}}, nil, '', 0)"'; rescue SyntaxError => e; e.message[/(?:\^|\A:(?:\d+:)?(?! syntax errors? found)(?: syntax error,)?) (.*)/, 1] end', message
"begin eval(%q{#{code}}, nil, '', 0)"'; rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)?(?! syntax errors? found)(?: syntax error,)?) (.*)/, 1] end', message
end
assert_syntax_error "unterminated string meets end of file", '().."', '[ruby-dev:29732]'
assert_equal %q{[]}, %q{$&;[]}, '[ruby-dev:31068]'
Expand Down
1 change: 1 addition & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3534,6 +3534,7 @@ compile.$(OBJEXT): {$(VPATH)}prism/prism.h
compile.$(OBJEXT): {$(VPATH)}prism/version.h
compile.$(OBJEXT): {$(VPATH)}prism_compile.c
compile.$(OBJEXT): {$(VPATH)}prism_compile.h
compile.$(OBJEXT): {$(VPATH)}ractor.h
compile.$(OBJEXT): {$(VPATH)}re.h
compile.$(OBJEXT): {$(VPATH)}regex.h
compile.$(OBJEXT): {$(VPATH)}ruby_assert.h
Expand Down
Loading

0 comments on commit 839b75d

Please sign in to comment.