ext/oj/load.c in oj-1.1.0 vs ext/oj/load.c in oj-1.1.1

- old
+ new

@@ -518,12 +518,14 @@ read_array(ParseInfo pi, int hint) { VALUE a = Qundef; VALUE e; int type = T_NONE; int cnt = 0; - long slen = 0; int a_str; +#ifndef NO_RSTRUCT + long slen = 0; +#endif pi->s++; next_non_white(pi); if (']' == *pi->s) { pi->s++; @@ -894,10 +896,11 @@ pi.circ_array = 0; if (Yes == options->circular) { pi.circ_array = circ_array_new(); } #ifdef HAVE_RUBY_ENCODING_H - pi.encoding = ('\0' == *options->encoding) ? 0 : rb_enc_find(options->encoding); + pi.encoding = options->encoding; + //pi.encoding = ('\0' == *options->encoding) ? 0 : rb_enc_find(options->encoding); #else pi.encoding = 0; #endif pi.options = options; obj = read_next(&pi, 0);