public static bool Require(ProtectedMethod Method) { IntPtr State = IntPtr.Zero; IntPtr Result = rb_protect(Method, Nil, ref State); return(Result == IntPtr.Zero); }
public static IntPtr SafeRuby(ProtectedMethod Method) { IntPtr State = IntPtr.Zero; IntPtr Result = rb_protect(Method, Nil, ref State); if (State != IntPtr.Zero) { RaiseException(); } return(Result); }