On Aug 1, 2010, at 2:22 PM, Father Chrysostomos wrote: > I believed the attached patch is self-explanatory. > <open_nKvdUEYU.txt> Someone pointed out to me that it would likely be reviewed more quickly if I provided a commit message, so here it is: This patch solves the problem of $x & "+0" not treating the RHS as a string if, on a previous invocation, the LHS happened to be a number (similarly with the other bitwise ops, too). This patch takes the conservative approach of fixing *just* those cases that have explicit quotation marks in the source code, which are clearly broken (and also ‘use constant’-style string constants, which are indistinguishable). (Read-only variables are slightly controversial still, and my patch does not affect those.) It does this by making the appropriate pp_ funcitons look at the op tree to see whether either operand is a constant during a numeric bitwise operation. If it is, and it is not numeric, it turns off the numericness (numericality?) before returning.Thread Previous