Is this a bug in GitLab or in Ruby? It's hard to tell from the report and the patch...

Or Rails...