{"action":"created","issue":{"url":"https://api.github.com/repos/osteele/liquid/issues/29","repository_url":"https://api.github.com/repos/osteele/liquid","labels_url":"https://api.github.com/repos/osteele/liquid/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/osteele/liquid/issues/29/comments","events_url":"https://api.github.com/repos/osteele/liquid/issues/29/events","html_url":"https://github.com/osteele/liquid/pull/29","id":327766543,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNDgwMzM2","number":29,"title":"Properly handle variadic functions.","user":{"login":"nsf","id":12567,"node_id":"MDQ6VXNlcjEyNTY3","avatar_url":"https://avatars2.githubusercontent.com/u/12567?v=4","gravatar_id":"","url":"https://api.github.com/users/nsf","html_url":"https://github.com/nsf","followers_url":"https://api.github.com/users/nsf/followers","following_url":"https://api.github.com/users/nsf/following{/other_user}","gists_url":"https://api.github.com/users/nsf/gists{/gist_id}","starred_url":"https://api.github.com/users/nsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsf/subscriptions","organizations_url":"https://api.github.com/users/nsf/orgs","repos_url":"https://api.github.com/users/nsf/repos","events_url":"https://api.github.com/users/nsf/events{/privacy}","received_events_url":"https://api.github.com/users/nsf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-30T14:49:40Z","updated_at":"2018-05-30T19:50:26Z","closed_at":"2018-05-30T19:50:04Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/osteele/liquid/pulls/29","html_url":"https://github.com/osteele/liquid/pull/29","diff_url":"https://github.com/osteele/liquid/pull/29.diff","patch_url":"https://github.com/osteele/liquid/pull/29.patch"},"body":"This commit addresses two issues:\r\n\r\n1. For variadic functions 'convertCallArguments' was allocating exactly\r\n   'len(args)' arguments, which might be less than required, as a result\r\n   zero/default filling loop would panic with out of bounds error.\r\n\r\n2. Even if we correctly allocate a proper amount of arguments, zero/default\r\n   filling loop doesn't handle special variadic function type case, when last\r\n   argument has a slice type and reflect API expects plain values as arguments.\r\n   But actually we don't need that, because it's okay to omit variadic values\r\n   altogether, hence the total amount of allocated arguments is\r\n   max(len(args), rt.NumIn()-1).\r\n\r\n## Checklist\r\n\r\n- [x] I have read the contribution guidelines.\r\n- [x] `make test` passes.\r\n- [x] `make lint` passes.\r\n- [x] New and changed code is covered by tests.\r\n- [x] Performance improvements include benchmarks.\r\n- [x] Changes match the *documented* (not just the *implemented*) behavior of Shopify.\r\n"},"comment":{"url":"https://api.github.com/repos/osteele/liquid/issues/comments/393294890","html_url":"https://github.com/osteele/liquid/pull/29#issuecomment-393294890","issue_url":"https://api.github.com/repos/osteele/liquid/issues/29","id":393294890,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzI5NDg5MA==","user":{"login":"osteele","id":674,"node_id":"MDQ6VXNlcjY3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/674?v=4","gravatar_id":"","url":"https://api.github.com/users/osteele","html_url":"https://github.com/osteele","followers_url":"https://api.github.com/users/osteele/followers","following_url":"https://api.github.com/users/osteele/following{/other_user}","gists_url":"https://api.github.com/users/osteele/gists{/gist_id}","starred_url":"https://api.github.com/users/osteele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osteele/subscriptions","organizations_url":"https://api.github.com/users/osteele/orgs","repos_url":"https://api.github.com/users/osteele/repos","events_url":"https://api.github.com/users/osteele/events{/privacy}","received_events_url":"https://api.github.com/users/osteele/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T19:50:26Z","updated_at":"2018-05-30T19:50:26Z","author_association":"OWNER","body":"Thanks! I’ll cut a new version shortly."}}
{"actor":{"display_login":"osteele"}}