Permalink
Browse files

Edited ext/tokyo_tyrant_table.c via GitHub

  • Loading branch information...
1 parent b3286c0 commit b5303807677874b8e6fc09f320d0915f5c8cb201 @gottlike gottlike committed Oct 6, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 ext/tokyo_tyrant_table.c
View
6 ext/tokyo_tyrant_table.c
@@ -171,7 +171,7 @@ static VALUE cTable_genuid(VALUE vself){
static VALUE cTable_fetch(int argc, VALUE *argv, VALUE vself){
VALUE vkey, vrv, vforce;
rb_scan_args(argc, argv, "11", &vkey, &vforce);
- if(rb_block_given_p() != Qtrue) rb_raise(rb_eArgError, "no block given");
+ if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
if(vforce == Qnil) vforce = Qfalse;
vkey = StringValueEx(vkey);
@@ -187,7 +187,7 @@ static VALUE cTable_each(VALUE vself){
VALUE vrv = Qnil;
char *kbuf;
int ksiz;
- if(rb_block_given_p() != Qtrue) rb_raise(rb_eArgError, "no block given");
+ if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
TCRDB *db = mTokyoTyrant_getdb(vself);
tcrdbiterinit(db);
@@ -205,7 +205,7 @@ static VALUE cTable_each_value(VALUE vself){
VALUE vrv = Qnil;
char *kbuf;
int ksiz;
- if(rb_block_given_p() != Qtrue) rb_raise(rb_eArgError, "no block given");
+ if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
TCRDB *db = mTokyoTyrant_getdb(vself);
tcrdbiterinit(db);

0 comments on commit b530380

Please sign in to comment.