diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-11 21:31:18 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-03-11 21:48:28 -0800 |
commit | 50c5f94ed71707030f03ef1ce699367f021e0aa3 (patch) | |
tree | fc3fcf963d0e955288354682c09f6eb4ad082058 /tool/mk_builtin_loader.rb | |
parent | 58f7e8b7f83babeefb39d1a919d43de237c36c8a (diff) | |
download | ruby-50c5f94ed71707030f03ef1ce699367f021e0aa3.tar.gz |
RJIT: Introduce constants under RubyVM::RJIT::C
Diffstat (limited to 'tool/mk_builtin_loader.rb')
-rw-r--r-- | tool/mk_builtin_loader.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb index fc6900808f..ba5e3c1ad7 100644 --- a/tool/mk_builtin_loader.rb +++ b/tool/mk_builtin_loader.rb @@ -265,7 +265,8 @@ def generate_cexpr(ofile, lineno, line_file, body_lineno, text, locals, func_nam f = StringIO.new f.puts '{' lineno += 1 - locals.reverse_each.with_index{|param, i| + # locals is nil outside methods + locals&.reverse_each&.with_index{|param, i| next unless Symbol === param f.puts "MAYBE_UNUSED(const VALUE) #{param} = rb_vm_lvar(ec, #{-3 - i});" lineno += 1 |