{"action":"created","issue":{"url":"https://api.github.com/repos/kraih/mojo/issues/856","labels_url":"https://api.github.com/repos/kraih/mojo/issues/856/labels{/name}","comments_url":"https://api.github.com/repos/kraih/mojo/issues/856/comments","events_url":"https://api.github.com/repos/kraih/mojo/issues/856/events","html_url":"https://github.com/kraih/mojo/issues/856","id":112688279,"number":856,"title":"Mojo::URL syntax error","user":{"login":"zdm","id":1025608,"avatar_url":"https://avatars.githubusercontent.com/u/1025608?v=3","gravatar_id":"","url":"https://api.github.com/users/zdm","html_url":"https://github.com/zdm","followers_url":"https://api.github.com/users/zdm/followers","following_url":"https://api.github.com/users/zdm/following{/other_user}","gists_url":"https://api.github.com/users/zdm/gists{/gist_id}","starred_url":"https://api.github.com/users/zdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdm/subscriptions","organizations_url":"https://api.github.com/users/zdm/orgs","repos_url":"https://api.github.com/users/zdm/repos","events_url":"https://api.github.com/users/zdm/events{/privacy}","received_events_url":"https://api.github.com/users/zdm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-21T22:00:44Z","updated_at":"2015-10-21T23:38:54Z","closed_at":"2015-10-21T22:32:21Z","body":"line 57:\r\n```\r\nmap { /^xn--(.+)$/ ? punycode_decode($_) : $_ } split(/\\./, shift, -1))\r\n```\r\nshould be:\r\n```\r\nmap { /^xn--(.+)$/ ? punycode_decode($1) : $_ } split(/\\./, shift, -1))\r\n```\r\nThe difference is in the punycode_decode argument."},"comment":{"url":"https://api.github.com/repos/kraih/mojo/issues/comments/150054677","html_url":"https://github.com/kraih/mojo/issues/856#issuecomment-150054677","issue_url":"https://api.github.com/repos/kraih/mojo/issues/856","id":150054677,"user":{"login":"zdm","id":1025608,"avatar_url":"https://avatars.githubusercontent.com/u/1025608?v=3","gravatar_id":"","url":"https://api.github.com/users/zdm","html_url":"https://github.com/zdm","followers_url":"https://api.github.com/users/zdm/followers","following_url":"https://api.github.com/users/zdm/following{/other_user}","gists_url":"https://api.github.com/users/zdm/gists{/gist_id}","starred_url":"https://api.github.com/users/zdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdm/subscriptions","organizations_url":"https://api.github.com/users/zdm/orgs","repos_url":"https://api.github.com/users/zdm/repos","events_url":"https://api.github.com/users/zdm/events{/privacy}","received_events_url":"https://api.github.com/users/zdm/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T23:38:54Z","updated_at":"2015-10-21T23:38:54Z","body":"This is not just optimization. this is error.\r\nYou can try\r\n```\r\nsay join '.', map { /^xn--(.+)$/ ? Mojo::Util::punycode_decode($_) : $_ } split( /\\./, 'aaa.xn--80aa8ab.com', -1 ); # aaa.ŲŬŲŬxn-.com - invalid result\r\n```\r\nand\r\n```\r\nsay join '.', map { /^xn--(.+)$/ ? Mojo::Util::punycode_decode($_) : $_ } split( /\\./, 'aaa.xn--80aa8ab.com', -1 ); # aaa.мама.com - OK\r\n```"}}