From 6e7f39829d6ce1cc80964d4cab85e1d33f1e1595 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 14 Jan 2019 06:38:34 +0000 Subject: merge revision(s) 66595: [Backport #15471] fix missed script_compiled events. [Bug #15471] * ruby.c (process_options): script_compiled events are missed on command line -e or specified file. this commit fix it. [Bug #15471] This patch should be backport to Ruby 2.6 branch. * vm_core.h (rb_exec_event_hook_script_compiled): introduce utility function to invoke a script_compiled event. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@66815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- load.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'load.c') diff --git a/load.c b/load.c index 83c5828b87..544357daba 100644 --- a/load.c +++ b/load.c @@ -608,9 +608,8 @@ rb_load_internal0(rb_execution_context_t *ec, VALUE fname, int wrap) fname, rb_realpath_internal(Qnil, fname, 1), NULL); rb_ast_dispose(ast); } - EXEC_EVENT_HOOK(ec, RUBY_EVENT_SCRIPT_COMPILED, - ec->cfp->self, 0, 0, 0, (VALUE)iseq); - rb_iseq_eval(iseq); + rb_exec_event_hook_script_compiled(ec, iseq, Qnil); + rb_iseq_eval(iseq); } EC_POP_TAG(); -- cgit v1.2.3