diff --git a/ext/racc/com/headius/racc/Cparse.java b/ext/racc/com/headius/racc/Cparse.java index 9d0e6d0b..4f66e033 100644 --- a/ext/racc/com/headius/racc/Cparse.java +++ b/ext/racc/com/headius/racc/Cparse.java @@ -281,7 +281,7 @@ public void parse_main(ThreadContext context, IRubyObject tok, IRubyObject val, i = assert_integer(tmp); D_printf("read_next=%d\n", read_next); - if (read_next && (this.t != vFINAL_TOKEN)) { + if (read_next && (!this.t.equals(vFINAL_TOKEN))) { if (this.lex_is_iterator) { D_puts("resuming..."); if (this.fin != 0) throw runtime.newArgumentError("token given after EOF"); @@ -405,7 +405,7 @@ else if (act == this.shift_n) { case USER_YYERROR: if (this.errstatus == 3) { - if (this.t == vFINAL_TOKEN) { + if (this.t.equals(vFINAL_TOKEN)) { this.retval = runtime.getFalse(); this.fin = CP_FIN_EOT; return; @@ -541,13 +541,13 @@ private IRubyObject reduce0(ThreadContext context) { /* call action */ if (len == 0) { tmp = context.nil; - if (mid != sym_noreduce) + if (!mid.equals(sym_noreduce)) tmp_v = runtime.newArray(); if (this.debug) tmp_t = runtime.newArray(); } else { - if (mid != sym_noreduce) { + if (!mid.equals(sym_noreduce)) { tmp_v = GET_TAIL(context, this.vstack, len); tmp = ((RubyArray)tmp_v).entry(0); } @@ -561,7 +561,7 @@ private IRubyObject reduce0(ThreadContext context) { } CUT_TAIL(context, this.state, len); } - if (mid != sym_noreduce) { + if (!mid.equals(sym_noreduce)) { if (this.use_result_var) { tmp = Helpers.invoke(context, this.parser, mid.toString(), tmp_v, this.vstack, tmp); } @@ -604,7 +604,7 @@ private IRubyObject reduce0(ThreadContext context) { D_puts("(goto) check[i] == nil"); branch = NOTFOUND; continue BRANCH; } - if (tmp != runtime.newFixnum(k1)) { + if (!tmp.equals(runtime.newFixnum(k1))) { D_puts("(goto) check[i] != table[i]"); branch = NOTFOUND; continue BRANCH; } @@ -773,7 +773,7 @@ public IRubyObject call(ThreadContext context, IRubyObject[] args, Block block) } }, context)); } catch (LexerUnroll maybeOurs) { - if (maybeOurs == lexerUnroll) { + if (maybeOurs.equals(lexerUnroll)) { return; } }