Skip to content

Commit 018a08e

Browse files
committed
Always set encindex to suppress warning: instance variable encindex not initialized
1 parent 5ecde6a commit 018a08e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/iconv/iconv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ iconv_initialize(int argc, VALUE *argv, VALUE self)
746746
DATA_PTR(self) = NULL;
747747
DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from, &opt, &idx));
748748
#ifdef HAVE_RUBY_ENCODING_H
749-
if (idx >= 0) ICONV_ENCODING_SET(self, idx);
749+
ICONV_ENCODING_SET(self, idx);
750750
#endif
751751
return self;
752752
}

0 commit comments

Comments
 (0)