diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-03-16 15:25:37 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2021-03-17 10:55:37 -0700 |
commit | ea817c60fcbdc2c4496be045f5bf028b702561ba (patch) | |
tree | 8b2ced0f5505268eeb2dd84d843b0301ae3ca959 /insns.def | |
parent | c3971bea3351e014171910402a220770196ed1cc (diff) |
Refactor vm_defined to return a boolean
We just need this function to return whether or not the thing we're
looking for is defined. If it's defined, return something true,
otherwise false.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4279
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -667,12 +667,10 @@ defined (VALUE val) // attr bool leaf = leafness_of_defined(op_type); { + val = Qnil; if (vm_defined(ec, GET_CFP(), op_type, obj, v)) { val = needstr; } - else { - val = Qnil; - } } /* check `target' matches `pattern'. |