Sha256: 2e1f5d7b01123232ef90bea85928a930672a9198731459305ea5f52ade5fddfa
Contents?: true
Size: 665 Bytes
Versions: 35
Compression:
Stored size: 665 Bytes
Contents
#include "check_ruby_type.hpp" #include "../Exception.hpp" void Rice::detail:: check_ruby_type( VALUE value, VALUE klass, bool include_super ) { if( !rb_obj_is_kind_of(value, klass) || (!include_super && rb_obj_class(value) != klass)) { // Not sure why this stuff can't be chained VALUE gotV = protect(rb_mod_name, rb_obj_class(value)); char* got = StringValuePtr(gotV); VALUE exptV = protect(rb_mod_name, klass); char* expected = StringValuePtr(exptV); throw Exception( rb_eTypeError, "wrong argument type %s (expected %s)", got, expected ); } }
Version data entries
35 entries across 35 versions & 6 rubygems