Skip to content

Commit faa0e1b

Browse files
committed
Simplify assertion expression
Move the static condition outside.
1 parent b42afa1 commit faa0e1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vm_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1991,7 +1991,7 @@ rb_current_execution_context(bool expect_ec)
19911991
#else
19921992
rb_execution_context_t *ec = native_tls_get(ruby_current_ec_key);
19931993
#endif
1994-
VM_ASSERT(!expect_ec || ec != NULL);
1994+
if (expect_ec) VM_ASSERT(ec);
19951995
return ec;
19961996
}
19971997

0 commit comments

Comments
 (0)