{"action":"created","comment":{"url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/comments/25766749","id":25766749,"diff_hunk":"@@ -65,8 +65,8 @@ M(http-subrequest-start) {\n --- request\n GET /lua\n --- response_body_like: 500 Internal Server Error\n---- error_log chop\n-variable \"dog\" cannot be assigned a value (maybe you forgot to define it first?)\n+--- error_log eval\n+qr/variable \"(dog|cat)\" cannot be assigned a value \\(maybe you forgot to define it first\\?\\)/","path":"t/055-subreq-vars.t","position":7,"original_position":7,"commit_id":"7377c2dea8371bc4338426aef254fb364ff699e2","original_commit_id":"7377c2dea8371bc4338426aef254fb364ff699e2","user":{"login":"maage","id":699415,"avatar_url":"https://avatars.githubusercontent.com/u/699415?v=3","gravatar_id":"","url":"https://api.github.com/users/maage","html_url":"https://github.com/maage","followers_url":"https://api.github.com/users/maage/followers","following_url":"https://api.github.com/users/maage/following{/other_user}","gists_url":"https://api.github.com/users/maage/gists{/gist_id}","starred_url":"https://api.github.com/users/maage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maage/subscriptions","organizations_url":"https://api.github.com/users/maage/orgs","repos_url":"https://api.github.com/users/maage/repos","events_url":"https://api.github.com/users/maage/events{/privacy}","received_events_url":"https://api.github.com/users/maage/received_events","type":"User","site_admin":false},"body":"When I use Lua 5.1 from RHEL-6 I get this:\r\n```\r\nt/055-subreq-vars.t .. 17/54 \r\n#   Failed test 'TEST 1: set non-existent variables via \"vars\" option - pattern \"variable \"dog\" cannot be assigned a value (maybe you forgot to define it first?)\" matches a line in error.log (req 0)'\r\n#   at lib/Test/Nginx/Socket.pm line 1105.\r\n\r\n#   Failed test 'TEST 1: set non-existent variables via \"vars\" option - pattern \"variable \"dog\" cannot be assigned a value (maybe you forgot to define it first?)\" matches a line in error.log (req 1)'\r\n#   at lib/Test/Nginx/Socket.pm line 1105.\r\n```\r\nIf I modify test to have \"cat\" it works. I'll look into this some more.","created_at":"2015-03-04T11:03:43Z","updated_at":"2015-03-04T11:03:43Z","html_url":"https://github.com/openresty/lua-nginx-module/pull/465#discussion_r25766749","pull_request_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/465","_links":{"self":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/comments/25766749"},"html":{"href":"https://github.com/openresty/lua-nginx-module/pull/465#discussion_r25766749"},"pull_request":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/465"}}},"pull_request":{"url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/465","id":30395220,"html_url":"https://github.com/openresty/lua-nginx-module/pull/465","diff_url":"https://github.com/openresty/lua-nginx-module/pull/465.diff","patch_url":"https://github.com/openresty/lua-nginx-module/pull/465.patch","issue_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues/465","number":465,"state":"open","locked":false,"title":"lua tables are not sorted","user":{"login":"maage","id":699415,"avatar_url":"https://avatars.githubusercontent.com/u/699415?v=3","gravatar_id":"","url":"https://api.github.com/users/maage","html_url":"https://github.com/maage","followers_url":"https://api.github.com/users/maage/followers","following_url":"https://api.github.com/users/maage/following{/other_user}","gists_url":"https://api.github.com/users/maage/gists{/gist_id}","starred_url":"https://api.github.com/users/maage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maage/subscriptions","organizations_url":"https://api.github.com/users/maage/orgs","repos_url":"https://api.github.com/users/maage/repos","events_url":"https://api.github.com/users/maage/events{/privacy}","received_events_url":"https://api.github.com/users/maage/received_events","type":"User","site_admin":false},"body":"See for example: http://www.lua.org/pil/19.3.html\r\n\r\nTwo strategies to solve this, either sort tables explicitly if it is\r\npossible. When sorting table is not possible, allow result in any order\r\nby using regexp.\r\n\r\nRegexp are mainly done with following script. Just drop outer (?^: ... ). Might be better just to use less items as generated regexps are not easy to follow anyways after there is more than 2 iterms.\r\n\r\n ```\r\n#!/usr/bin/perl\r\nuse Algorithm::Permute;\r\nuse Regexp::Assemble;\r\nmy @arr = map { split } @ARGV;\r\nmy $ra = Regexp::Assemble->new;\r\nAlgorithm::Permute::permute { $ra->add( '^\\Q'.join('&', @arr).'\\E'.q{$} ) } @arr;\r\nprint $ra->re;\r\nprint \"\\n\";\r\n```","created_at":"2015-03-03T17:39:17Z","updated_at":"2015-03-04T11:03:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9e7249eecb7825992ae0e6782c17d081e1105cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/465/commits","review_comments_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/465/comments","review_comment_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues/465/comments","statuses_url":"https://api.github.com/repos/openresty/lua-nginx-module/statuses/7377c2dea8371bc4338426aef254fb364ff699e2","head":{"label":"maage:lua_tables_not_sorted","ref":"lua_tables_not_sorted","sha":"7377c2dea8371bc4338426aef254fb364ff699e2","user":{"login":"maage","id":699415,"avatar_url":"https://avatars.githubusercontent.com/u/699415?v=3","gravatar_id":"","url":"https://api.github.com/users/maage","html_url":"https://github.com/maage","followers_url":"https://api.github.com/users/maage/followers","following_url":"https://api.github.com/users/maage/following{/other_user}","gists_url":"https://api.github.com/users/maage/gists{/gist_id}","starred_url":"https://api.github.com/users/maage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maage/subscriptions","organizations_url":"https://api.github.com/users/maage/orgs","repos_url":"https://api.github.com/users/maage/repos","events_url":"https://api.github.com/users/maage/events{/privacy}","received_events_url":"https://api.github.com/users/maage/received_events","type":"User","site_admin":false},"repo":{"id":31611100,"name":"lua-nginx-module","full_name":"maage/lua-nginx-module","owner":{"login":"maage","id":699415,"avatar_url":"https://avatars.githubusercontent.com/u/699415?v=3","gravatar_id":"","url":"https://api.github.com/users/maage","html_url":"https://github.com/maage","followers_url":"https://api.github.com/users/maage/followers","following_url":"https://api.github.com/users/maage/following{/other_user}","gists_url":"https://api.github.com/users/maage/gists{/gist_id}","starred_url":"https://api.github.com/users/maage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maage/subscriptions","organizations_url":"https://api.github.com/users/maage/orgs","repos_url":"https://api.github.com/users/maage/repos","events_url":"https://api.github.com/users/maage/events{/privacy}","received_events_url":"https://api.github.com/users/maage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maage/lua-nginx-module","description":"Embed the Power of Lua into NGINX","fork":true,"url":"https://api.github.com/repos/maage/lua-nginx-module","forks_url":"https://api.github.com/repos/maage/lua-nginx-module/forks","keys_url":"https://api.github.com/repos/maage/lua-nginx-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maage/lua-nginx-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maage/lua-nginx-module/teams","hooks_url":"https://api.github.com/repos/maage/lua-nginx-module/hooks","issue_events_url":"https://api.github.com/repos/maage/lua-nginx-module/issues/events{/number}","events_url":"https://api.github.com/repos/maage/lua-nginx-module/events","assignees_url":"https://api.github.com/repos/maage/lua-nginx-module/assignees{/user}","branches_url":"https://api.github.com/repos/maage/lua-nginx-module/branches{/branch}","tags_url":"https://api.github.com/repos/maage/lua-nginx-module/tags","blobs_url":"https://api.github.com/repos/maage/lua-nginx-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maage/lua-nginx-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maage/lua-nginx-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/maage/lua-nginx-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maage/lua-nginx-module/statuses/{sha}","languages_url":"https://api.github.com/repos/maage/lua-nginx-module/languages","stargazers_url":"https://api.github.com/repos/maage/lua-nginx-module/stargazers","contributors_url":"https://api.github.com/repos/maage/lua-nginx-module/contributors","subscribers_url":"https://api.github.com/repos/maage/lua-nginx-module/subscribers","subscription_url":"https://api.github.com/repos/maage/lua-nginx-module/subscription","commits_url":"https://api.github.com/repos/maage/lua-nginx-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/maage/lua-nginx-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/maage/lua-nginx-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/maage/lua-nginx-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/maage/lua-nginx-module/contents/{+path}","compare_url":"https://api.github.com/repos/maage/lua-nginx-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maage/lua-nginx-module/merges","archive_url":"https://api.github.com/repos/maage/lua-nginx-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maage/lua-nginx-module/downloads","issues_url":"https://api.github.com/repos/maage/lua-nginx-module/issues{/number}","pulls_url":"https://api.github.com/repos/maage/lua-nginx-module/pulls{/number}","milestones_url":"https://api.github.com/repos/maage/lua-nginx-module/milestones{/number}","notifications_url":"https://api.github.com/repos/maage/lua-nginx-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maage/lua-nginx-module/labels{/name}","releases_url":"https://api.github.com/repos/maage/lua-nginx-module/releases{/id}","created_at":"2015-03-03T17:22:25Z","updated_at":"2015-03-03T17:22:28Z","pushed_at":"2015-03-03T17:42:55Z","git_url":"git://github.com/maage/lua-nginx-module.git","ssh_url":"git@github.com:maage/lua-nginx-module.git","clone_url":"https://github.com/maage/lua-nginx-module.git","svn_url":"https://github.com/maage/lua-nginx-module","homepage":"http://openresty.org","size":20609,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openresty:master","ref":"master","sha":"8f6790de7dc376c9e5ee0a3f332660ab12f03ef7","user":{"login":"openresty","id":7390180,"avatar_url":"https://avatars.githubusercontent.com/u/7390180?v=3","gravatar_id":"","url":"https://api.github.com/users/openresty","html_url":"https://github.com/openresty","followers_url":"https://api.github.com/users/openresty/followers","following_url":"https://api.github.com/users/openresty/following{/other_user}","gists_url":"https://api.github.com/users/openresty/gists{/gist_id}","starred_url":"https://api.github.com/users/openresty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openresty/subscriptions","organizations_url":"https://api.github.com/users/openresty/orgs","repos_url":"https://api.github.com/users/openresty/repos","events_url":"https://api.github.com/users/openresty/events{/privacy}","received_events_url":"https://api.github.com/users/openresty/received_events","type":"Organization","site_admin":false},"repo":{"id":613829,"name":"lua-nginx-module","full_name":"openresty/lua-nginx-module","owner":{"login":"openresty","id":7390180,"avatar_url":"https://avatars.githubusercontent.com/u/7390180?v=3","gravatar_id":"","url":"https://api.github.com/users/openresty","html_url":"https://github.com/openresty","followers_url":"https://api.github.com/users/openresty/followers","following_url":"https://api.github.com/users/openresty/following{/other_user}","gists_url":"https://api.github.com/users/openresty/gists{/gist_id}","starred_url":"https://api.github.com/users/openresty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openresty/subscriptions","organizations_url":"https://api.github.com/users/openresty/orgs","repos_url":"https://api.github.com/users/openresty/repos","events_url":"https://api.github.com/users/openresty/events{/privacy}","received_events_url":"https://api.github.com/users/openresty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openresty/lua-nginx-module","description":"Embed the Power of Lua into NGINX","fork":false,"url":"https://api.github.com/repos/openresty/lua-nginx-module","forks_url":"https://api.github.com/repos/openresty/lua-nginx-module/forks","keys_url":"https://api.github.com/repos/openresty/lua-nginx-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openresty/lua-nginx-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openresty/lua-nginx-module/teams","hooks_url":"https://api.github.com/repos/openresty/lua-nginx-module/hooks","issue_events_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues/events{/number}","events_url":"https://api.github.com/repos/openresty/lua-nginx-module/events","assignees_url":"https://api.github.com/repos/openresty/lua-nginx-module/assignees{/user}","branches_url":"https://api.github.com/repos/openresty/lua-nginx-module/branches{/branch}","tags_url":"https://api.github.com/repos/openresty/lua-nginx-module/tags","blobs_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openresty/lua-nginx-module/statuses/{sha}","languages_url":"https://api.github.com/repos/openresty/lua-nginx-module/languages","stargazers_url":"https://api.github.com/repos/openresty/lua-nginx-module/stargazers","contributors_url":"https://api.github.com/repos/openresty/lua-nginx-module/contributors","subscribers_url":"https://api.github.com/repos/openresty/lua-nginx-module/subscribers","subscription_url":"https://api.github.com/repos/openresty/lua-nginx-module/subscription","commits_url":"https://api.github.com/repos/openresty/lua-nginx-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/openresty/lua-nginx-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/openresty/lua-nginx-module/contents/{+path}","compare_url":"https://api.github.com/repos/openresty/lua-nginx-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openresty/lua-nginx-module/merges","archive_url":"https://api.github.com/repos/openresty/lua-nginx-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openresty/lua-nginx-module/downloads","issues_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues{/number}","pulls_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls{/number}","milestones_url":"https://api.github.com/repos/openresty/lua-nginx-module/milestones{/number}","notifications_url":"https://api.github.com/repos/openresty/lua-nginx-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openresty/lua-nginx-module/labels{/name}","releases_url":"https://api.github.com/repos/openresty/lua-nginx-module/releases{/id}","created_at":"2010-04-16T15:59:01Z","updated_at":"2015-03-04T00:45:30Z","pushed_at":"2015-03-03T21:02:35Z","git_url":"git://github.com/openresty/lua-nginx-module.git","ssh_url":"git@github.com:openresty/lua-nginx-module.git","clone_url":"https://github.com/openresty/lua-nginx-module.git","svn_url":"https://github.com/openresty/lua-nginx-module","homepage":"http://openresty.org","size":20609,"stargazers_count":1435,"watchers_count":1435,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":322,"mirror_url":null,"open_issues_count":55,"forks":322,"open_issues":55,"watchers":1435,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/465"},"html":{"href":"https://github.com/openresty/lua-nginx-module/pull/465"},"issue":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/issues/465"},"comments":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/issues/465/comments"},"review_comments":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/465/comments"},"review_comment":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/465/commits"},"statuses":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/statuses/7377c2dea8371bc4338426aef254fb364ff699e2"}}}}