Issue with underscore (_) when iterating over a struct

Description

When looping over a struct there is weirdness going on when struct keys have underscores in them. I uploaded a screenshot of an example where I am trying to wrap each key of a struct with {{}}.

Environment

lucee version 5.3.3.62

Activity

Show:
Michael Offner
May 11, 2020, 5:41 PM

BTW this also affect a regular cfloop, so this is not limited to “each“

Michael Offner
May 11, 2020, 5:51 PM

I did some testing with this. Sadly this would make everything much slower, so my vote is to reject this ticket, because a “fix“ would have a negative impact on performance in Lucee in general for an edge case. We see bad performance also as a bug, so this would be a trade of one bug against an other.

We could consider a global setting for this, to enable/disable this.

Arthur
May 11, 2020, 6:55 PM

when you do a for-loop it works just fine

Michael Offner
May 18, 2020, 1:44 PM

yes, because in that case a method is used that create a new set of keys.

Arthur
May 18, 2020, 1:51 PM

since there is a work-around I am OK with this being in the backlog for now. Performance has definitely a bigger weight here

Assignee

Michael Offner

Reporter

Arthur

Priority

Minor

Labels

Fix versions

None

Affects versions

Configure