From: nobu.nokada@... Date: 2001-12-28T10:17:50+09:00 Subject: [ruby-talk:29502] Re: C extensions to Ruby: classes vs. types At Fri, 28 Dec 2001 09:22:17 +0900, Tomasz Wegrzanowski wrote: > And I'm confused. > Is there any document where type vs. class is explained in details ? README.EXT can't help you? > I want to do something like that: static VALUE myclass_mymethod(VALUE self, VALUE arg) { VALUE result; if (rb_obj_is_instance_of(arg, CLASS1)) { result = action1; } else if (rb_obj_is_kind_of(arg, CLASS2)) { result = action2; } else { rb_raise(exception, "something wicked"); } return result; } Nobu Nakada