config = '' fred = 42 fred == 42 ? config = 'k1' : config = 'k2' print "config=#{config}\n" #### #### #include int main() { int config = 0; int fred = 42; fred == 42 ? config = 1 : config = 2; printf("config=%d\n", config); return 0; } #### fred == 42 ? (config = 1) : (config = 2); // this works fred == 42 ? config = 1 : (config = 2); // also works fred == 42 ? (config = 1) : config = 2; // syntax error