Skip to content

Commit

Permalink
fixed irb bug. irb isn't ok with a funtion that returns void;it doesn…
Browse files Browse the repository at this point in the history
…'t know what print out to the screen as the return value. I return the object now after mix and unmix... kind of a friendly thing to be doing anyway

git-svn-id: svn+ssh://rubyforge.org/var/svn/mixology/trunk@9 62817f43-b31e-4560-8c3d-5e0e681460fe
  • Loading branch information
pfarley committed Aug 18, 2007
1 parent bc96223 commit a213122
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/mixable/mixable.c
@@ -1,6 +1,6 @@
#include "ruby.h"

static void rb_unmix(VALUE self, VALUE module) {
static VALUE rb_unmix(VALUE self, VALUE module) {
VALUE klass;
for (klass = RBASIC(self)->klass; klass != rb_class_real(klass); klass = RCLASS(klass)->super) {
VALUE super = RCLASS(klass)->super;
Expand All @@ -11,9 +11,10 @@ static void rb_unmix(VALUE self, VALUE module) {
}
}
}
return self;
}

static void rb_mixin(VALUE self, VALUE module) {
static VALUE rb_mixin(VALUE self, VALUE module) {

rb_unmix(self, module);

Expand Down Expand Up @@ -41,6 +42,7 @@ static void rb_mixin(VALUE self, VALUE module) {

RCLASS(rb_singleton_class(self))->super = klass;
rb_clear_cache();
return self;
}

void Init_mixable() {
Expand Down

0 comments on commit a213122

Please sign in to comment.