Permalink
Browse files

[fix #126] does not call Pointer#to_object with the object which is c…

…reated by Pointer.new
  • Loading branch information...
1 parent e50c757 commit 6b17568bdfe62a6702bfd10205718d2c3a4e253e @Watson1978 Watson1978 committed Jul 8, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 bridgesupport.cpp
View
3 bridgesupport.cpp
@@ -1033,6 +1033,9 @@ rb_pointer_to_obj(VALUE rcv, SEL sel)
Data_Get_Struct(rcv, rb_vm_pointer_t, ptr);
check_no_magic_cookie(ptr);
+ if (ptr->len != 0) {
+ rb_raise(rb_eRuntimeError, "This method is not support to call with the object which is created by Pointer.new");
+ }
return (VALUE)ptr->val;
}

0 comments on commit 6b17568

Please sign in to comment.