Raise TypeError on bad initialize

This commit is contained in:
Peter Wagenet 2017-04-27 12:58:43 -07:00
parent 2bbb8ae9fd
commit 8d67226300
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ macro_rules! codegen_define_method {
let data = Box::new(rust_self);
unsafe { $crate::sys::Data_Set_Struct_Value(rb_self, ::std::mem::transmute(data)) };
}
Err(err) => { println!("TYPE ERROR: {:?}", err); }
Err(e) => $crate::ExceptionInfo::type_error(e).raise()
}
rb_self