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

Attachments

1

Activity

Show:

Arthur 18 May 2020 at 13:51

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

Michael Offner 18 May 2020 at 13:44

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

Arthur 11 May 2020 at 18:55

when you do a for-loop it works just fine

Michael Offner 11 May 2020 at 17:51

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.

Michael Offner 11 May 2020 at 17:41

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

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 7 February 2020 at 04:37
Updated 18 June 2023 at 16:50