diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-09-18 21:52:18 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-09-18 21:52:18 +0900 |
commit | 1b300789ffc5fda1fcb534d0611ffdb7731e5b9d (patch) | |
tree | a47b221d23442559a811ba40a997b82ce3b26301 /ast.c | |
parent | ed9d9cee76ee941c504ccea33c70c0eb5d825813 (diff) | |
download | ruby-1b300789ffc5fda1fcb534d0611ffdb7731e5b9d.tar.gz |
ast.c: AST.of against C method should return nil (as Ruby 2.6--3.0)
Diffstat (limited to 'ast.c')
-rw-r--r-- | ast.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -214,7 +214,7 @@ ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body, VALUE keep_script iseq = rb_method_iseq(body); } if (!iseq) { - rb_raise(rb_eArgError, "cannot get AST for method that is not defined in Ruby"); + return Qnil; } if (rb_iseq_from_eval_p(iseq)) { rb_raise(rb_eArgError, "cannot get AST for method defined in eval"); |