Skip to content

Commit

Permalink
[fix #127] check whether passed queue is main queue.
Browse files Browse the repository at this point in the history
can't check with CLASS_OF() because changed the class information of main queue by adding a method "run" to main queue
  • Loading branch information
Watson1978 committed Jul 9, 2012
1 parent 6b17568 commit 8f1a017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static VALUE const_time_forever;
static inline void
Check_Queue(VALUE object)
{
if (CLASS_OF(object) != cQueue) {
if (CLASS_OF(object) != cQueue && object != qMain) {
rb_raise(rb_eArgError, "expected Queue object, but got %s",
rb_class2name(CLASS_OF(object)));
}
Expand Down

0 comments on commit 8f1a017

Please sign in to comment.