diff --git a/Lib/ruby/rubyhead.swg b/Lib/ruby/rubyhead.swg index a34f7eab7..90becd694 100644 --- a/Lib/ruby/rubyhead.swg +++ b/Lib/ruby/rubyhead.swg @@ -106,3 +106,7 @@ typedef struct { #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") #endif +/* Contract support */ + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { rb_raise(rb_eRuntimeError, (char *) msg ); } else +