# \[2.0.0-SNAPSHOT\] Issues with doIfEqualsOrElse

**URL:** https://community.gatling.io/t/2-0-0-snapshot-issues-with-doifequalsorelse/539
**Category:** Gatling (Open-Source)
**Created:** [August 12, 2013, 11:10am UTC](https://community.gatling.io/t/2-0-0-snapshot-issues-with-doifequalsorelse/539 "2013-08-12T11:10:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Stefan\_Magnus\_Landro](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@Stefan\_Magnus\_Landro](https://community.gatling.io/u/Stefan_Magnus_Landro)
#### Post date: [August 12, 2013, 11:10am UTC](https://community.gatling.io/t/2-0-0-snapshot-issues-with-doifequalsorelse/539/1 "2013-08-12T11:10:07Z")

</div>

Hi there,

It seems like there is an issue in master (this worked in M3a):

.foreach(list, “element”, “counter”) {  
doIfEqualsOrElse(0, “${counter}”) {  
// never reached  
}  
{  
// all iterations go here  
}

Cheers

Stefan

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [August 27, 2013, 8:39am UTC](https://community.gatling.io/t/2-0-0-snapshot-issues-with-doifequalsorelse/539/2 "2013-08-27T08:39:52Z")

</div>

That was indeed a regression.  
Fixed: [https://github.com/excilys/gatling/commit/fbe61ca79694db07fcf8af4a2a22b33cf442dba0](https://github.com/excilys/gatling/commit/fbe61ca79694db07fcf8af4a2a22b33cf442dba0)

Thanks for reporting, Stefan!
