diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h index ae3ea101..12538a3a 100644 --- a/bindings/ruby/defs.h +++ b/bindings/ruby/defs.h @@ -58,7 +58,7 @@ extern ID ID_db_mode; #define Data_Get_Notmuch_Object(obj, ptr) \ do { \ (ptr) = rb_data_object_get ((obj)); \ - if (!(ptr)) { \ + if (RB_UNLIKELY (!(ptr))) { \ VALUE cname = rb_class_name (CLASS_OF ((obj))); \ rb_raise (rb_eRuntimeError, "%"PRIsVALUE" object destroyed", cname); \ } \