{"action":"created","issue":{"url":"https://api.github.com/repos/stevedonovan/Penlight/issues/169","labels_url":"https://api.github.com/repos/stevedonovan/Penlight/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/stevedonovan/Penlight/issues/169/comments","events_url":"https://api.github.com/repos/stevedonovan/Penlight/issues/169/events","html_url":"https://github.com/stevedonovan/Penlight/issues/169","id":113271940,"number":169,"title":"`pairs` for OrderedMap fails sometimes","user":{"login":"eulerreich","id":4183609,"avatar_url":"https://avatars.githubusercontent.com/u/4183609?v=3","gravatar_id":"","url":"https://api.github.com/users/eulerreich","html_url":"https://github.com/eulerreich","followers_url":"https://api.github.com/users/eulerreich/followers","following_url":"https://api.github.com/users/eulerreich/following{/other_user}","gists_url":"https://api.github.com/users/eulerreich/gists{/gist_id}","starred_url":"https://api.github.com/users/eulerreich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eulerreich/subscriptions","organizations_url":"https://api.github.com/users/eulerreich/orgs","repos_url":"https://api.github.com/users/eulerreich/repos","events_url":"https://api.github.com/users/eulerreich/events{/privacy}","received_events_url":"https://api.github.com/users/eulerreich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-26T02:08:17Z","updated_at":"2015-10-26T10:05:21Z","closed_at":null,"body":"In\r\n```\r\nfor k, v in pairs(map) do\r\n    print(k, v)\r\nend\r\n```\r\n`pairs` for `OrderedMap` will sometimes return `_keys` and the set of keys as `k` and `v`. I can't reproduce this with simple examples, but I have it happening maybe once out of 100 times in my code, after which it will always break. Changing `pairs(map)` to `map:iter()` fixes it.\r\n\r\nThis is with Luajit 2.1.0-alpha and torch."},"comment":{"url":"https://api.github.com/repos/stevedonovan/Penlight/issues/comments/151088259","html_url":"https://github.com/stevedonovan/Penlight/issues/169#issuecomment-151088259","issue_url":"https://api.github.com/repos/stevedonovan/Penlight/issues/169","id":151088259,"user":{"login":"mpeterv","id":6032370,"avatar_url":"https://avatars.githubusercontent.com/u/6032370?v=3","gravatar_id":"","url":"https://api.github.com/users/mpeterv","html_url":"https://github.com/mpeterv","followers_url":"https://api.github.com/users/mpeterv/followers","following_url":"https://api.github.com/users/mpeterv/following{/other_user}","gists_url":"https://api.github.com/users/mpeterv/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeterv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeterv/subscriptions","organizations_url":"https://api.github.com/users/mpeterv/orgs","repos_url":"https://api.github.com/users/mpeterv/repos","events_url":"https://api.github.com/users/mpeterv/events{/privacy}","received_events_url":"https://api.github.com/users/mpeterv/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T10:05:21Z","updated_at":"2015-10-26T10:05:21Z","body":"This looks like an issue with LuaJIT. Does it persist if you upgrade to latest commit on v2.1 branch (https://github.com/LuaJIT/LuaJIT/tree/v2.1)? There were some commits related to `__pairs`."}}