From: usa@... Date: 2016-04-22T08:00:06+00:00 Subject: [ruby-core:75099] [Ruby trunk Bug#12201] nkf.c static void fold_conv part of exression always true Issue #12201 has been updated by Usaku NAKAMURA. Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: WONTFIX, 2.2: REQUIRED, 2.3: REQUIRED ---------------------------------------- Bug #12201: nkf.c static void fold_conv part of exression always true https://bugs.ruby-lang.org/issues/12201#change-58227 * Author: Anton Sivakov * Status: Closed * Priority: Normal * Assignee: Shyouhei Urabe * ruby -v: * Backport: 2.1: WONTFIX, 2.2: REQUIRED, 2.3: REQUIRED ---------------------------------------- ~~~ /* 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: