<p>Replacing</p>
<pre><code> res << GD2::AnimatedGif.gif_anim_add(frames[n], frames[n - 1], delay)
</code></pre>
<p>by</p>
<pre><code> res << GD2::AnimatedGif.gif_anim_add(frames[n], frames[n - 1], delay) unless frames[n] == frames[n - 1]
</code></pre>
<p>lets the unit tests pass. For whatever reason gif_anim_add isn't happy with two identical images in a row. This feels a bit like a hack, and I don't know yet what is caused this behavior.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2132#issuecomment-479441585">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLbh_9S19T1sGnVKs5xAhJdmR0omUks5vdInLgaJpZM4ak6Cd">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLTZYMMlGCz0gFixJEVcUo_qibC8Eks5vdInLgaJpZM4ak6Cd.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@mmd-osm in #2132: Replacing\r\n\r\n```\r\n res \u003c\u003c GD2::AnimatedGif.gif_anim_add(frames[n], frames[n - 1], delay)\r\n```\r\n\r\nby \r\n\r\n```\r\n res \u003c\u003c GD2::AnimatedGif.gif_anim_add(frames[n], frames[n - 1], delay) unless frames[n] == frames[n - 1]\r\n```\r\n\r\nlets the unit tests pass. For whatever reason gif_anim_add isn't happy with two identical images in a row. This feels a bit like a hack, and I don't know yet what is caused this behavior."}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/2132#issuecomment-479441585"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2132#issuecomment-479441585",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2132#issuecomment-479441585",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>