{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/304","repository_url":"https://api.github.com/repos/rust-lang-nursery/regex","labels_url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/304/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/304/events","html_url":"https://github.com/rust-lang-nursery/regex/pull/304","id":194227864,"number":304,"title":"Verify character class still non-empty after converting to byte class","user":{"login":"scooter-dangle","id":934707,"avatar_url":"https://avatars.githubusercontent.com/u/934707?v=3","gravatar_id":"","url":"https://api.github.com/users/scooter-dangle","html_url":"https://github.com/scooter-dangle","followers_url":"https://api.github.com/users/scooter-dangle/followers","following_url":"https://api.github.com/users/scooter-dangle/following{/other_user}","gists_url":"https://api.github.com/users/scooter-dangle/gists{/gist_id}","starred_url":"https://api.github.com/users/scooter-dangle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scooter-dangle/subscriptions","organizations_url":"https://api.github.com/users/scooter-dangle/orgs","repos_url":"https://api.github.com/users/scooter-dangle/repos","events_url":"https://api.github.com/users/scooter-dangle/events{/privacy}","received_events_url":"https://api.github.com/users/scooter-dangle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-08T02:01:32Z","updated_at":"2016-12-29T00:30:52Z","closed_at":"2016-12-29T00:30:50Z","pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/regex/pulls/304","html_url":"https://github.com/rust-lang-nursery/regex/pull/304","diff_url":"https://github.com/rust-lang-nursery/regex/pull/304.diff","patch_url":"https://github.com/rust-lang-nursery/regex/pull/304.patch"},"body":"For `[^\\x00-\\xff]`, while it is still treated as a full Unicode character class, it is not empty. For instance `≥` would still be matched.\r\n\r\nHowever, when `CharClass::to_byte_class` is called on it (as is done when using `regex::bytes::Regex::new` rather than `regex::Regex::new`), it _is_ now empty, since it excludes all possible bytes.\r\n\r\nThis commit adds a test asserting that `regex::bytes::Regex::new` returns `Err` for this case (in accordance with https://github.com/rust-lang-nursery/regex/issues/106) and adds an `is_empty` check to the result of calling `CharClass::to_byte_class`, which allows the test to pass.\r\n\r\nFixes https://github.com/rust-lang-nursery/regex/issues/303"},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/comments/269563488","html_url":"https://github.com/rust-lang-nursery/regex/pull/304#issuecomment-269563488","issue_url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/304","id":269563488,"user":{"login":"BurntSushi","id":456674,"avatar_url":"https://avatars.githubusercontent.com/u/456674?v=3","gravatar_id":"","url":"https://api.github.com/users/BurntSushi","html_url":"https://github.com/BurntSushi","followers_url":"https://api.github.com/users/BurntSushi/followers","following_url":"https://api.github.com/users/BurntSushi/following{/other_user}","gists_url":"https://api.github.com/users/BurntSushi/gists{/gist_id}","starred_url":"https://api.github.com/users/BurntSushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BurntSushi/subscriptions","organizations_url":"https://api.github.com/users/BurntSushi/orgs","repos_url":"https://api.github.com/users/BurntSushi/repos","events_url":"https://api.github.com/users/BurntSushi/events{/privacy}","received_events_url":"https://api.github.com/users/BurntSushi/received_events","type":"User","site_admin":false},"created_at":"2016-12-29T00:30:52Z","updated_at":"2016-12-29T00:30:52Z","body":"I finally had a chance to actually dig into the problem you described and I agree with your analysis and the fix. Thank you so much!\r\n\r\nI will add a test to `regex-syntax` for this as well."}}
{"actor":{"display_login":"BurntSushi"}}