Skip to content

Commit

Permalink
[fix #126] does not call Pointer#to_object with the object which is c…
Browse files Browse the repository at this point in the history
…reated by Pointer.new
  • Loading branch information
Watson1978 committed Jul 8, 2012
1 parent e50c757 commit 6b17568
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bridgesupport.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6b17568

Please sign in to comment.