From: nagachika00@... Date: 2016-04-22T15:40:19+00:00 Subject: [ruby-core:75140] [Ruby trunk Bug#12201] nkf.c static void fold_conv part of exression always true Issue #12201 has been updated by Tomoyuki Chikanaga. Backport changed from 2.1: WONTFIX, 2.2: DONE, 2.3: REQUIRED to 2.1: WONTFIX, 2.2: DONE, 2.3: DONE ruby_2_3 r54714 merged revision(s) 54423,54489. ---------------------------------------- Bug #12201: nkf.c static void fold_conv part of exression always true https://bugs.ruby-lang.org/issues/12201#change-58272 * Author: Anton Sivakov * Status: Closed * Priority: Normal * Assignee: Shyouhei Urabe * ruby -v: * Backport: 2.1: WONTFIX, 2.2: DONE, 2.3: DONE ---------------------------------------- ~~~ /* new line */ if (fold_preserve_f) { f_prev = c1; f_line = 0; fold_state = CR; } else if ((f_prev == c1 && !fold_preserve_f) || (f_prev == LF && fold_preserve_f) ) { /* duplicate newline */ ~~~ f_prev == c1 && !fold_preserve_f - here expression !fold_preserve_f always true because above we have if (fold_preserve_f) and here 'else if' (f_prev == LF && fold_preserve_f) - this expression alway will be false for the same reason -- https://bugs.ruby-lang.org/ Unsubscribe: