Skip to content

Commit ce20d68

Browse files
authored
Mark leaf defined instructions as leaf
For example, `defined?(yield)` never calls a method, so it's leaf.
1 parent 30f32a0 commit ce20d68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tool/ruby_vm/views/_leaf_helpers.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ leafness_of_defined(rb_num_t op_type)
2121
case DEFINED_YIELD:
2222
case DEFINED_REF:
2323
case DEFINED_ZSUPER:
24-
return false;
24+
return true;
2525
case DEFINED_CONST:
2626
case DEFINED_CONST_FROM:
2727
/* has rb_autoload_load(); */

0 commit comments

Comments
 (0)