{"action":"created","issue":{"url":"https://api.github.com/repos/jeremyevans/roda/issues/103","repository_url":"https://api.github.com/repos/jeremyevans/roda","labels_url":"https://api.github.com/repos/jeremyevans/roda/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/jeremyevans/roda/issues/103/comments","events_url":"https://api.github.com/repos/jeremyevans/roda/issues/103/events","html_url":"https://github.com/jeremyevans/roda/pull/103","id":179443542,"number":103,"title":"Use STATUS_WITH_NO_ENTITY_BODY in finish instead of hardcoded ints.","user":{"login":"celsworth","id":2658891,"avatar_url":"https://avatars.githubusercontent.com/u/2658891?v=3","gravatar_id":"","url":"https://api.github.com/users/celsworth","html_url":"https://github.com/celsworth","followers_url":"https://api.github.com/users/celsworth/followers","following_url":"https://api.github.com/users/celsworth/following{/other_user}","gists_url":"https://api.github.com/users/celsworth/gists{/gist_id}","starred_url":"https://api.github.com/users/celsworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celsworth/subscriptions","organizations_url":"https://api.github.com/users/celsworth/orgs","repos_url":"https://api.github.com/users/celsworth/repos","events_url":"https://api.github.com/users/celsworth/events{/privacy}","received_events_url":"https://api.github.com/users/celsworth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-27T09:37:59Z","updated_at":"2016-09-27T11:30:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jeremyevans/roda/pulls/103","html_url":"https://github.com/jeremyevans/roda/pull/103","diff_url":"https://github.com/jeremyevans/roda/pull/103.diff","patch_url":"https://github.com/jeremyevans/roda/pull/103.patch"},"body":"Rack::Utils has a Set available with this list of integers in, and checking a Set for inclusion should be faster than all the comparisons.\r\n\r\nJust an exploratory PR really to see what you think :)\r\n\r\nI did also wonder whether it was worth `dup`ing and `freeze`ing it to a local constant?"},"comment":{"url":"https://api.github.com/repos/jeremyevans/roda/issues/comments/249839014","html_url":"https://github.com/jeremyevans/roda/pull/103#issuecomment-249839014","issue_url":"https://api.github.com/repos/jeremyevans/roda/issues/103","id":249839014,"user":{"login":"TiagoCardoso1983","id":215707,"avatar_url":"https://avatars.githubusercontent.com/u/215707?v=3","gravatar_id":"","url":"https://api.github.com/users/TiagoCardoso1983","html_url":"https://github.com/TiagoCardoso1983","followers_url":"https://api.github.com/users/TiagoCardoso1983/followers","following_url":"https://api.github.com/users/TiagoCardoso1983/following{/other_user}","gists_url":"https://api.github.com/users/TiagoCardoso1983/gists{/gist_id}","starred_url":"https://api.github.com/users/TiagoCardoso1983/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TiagoCardoso1983/subscriptions","organizations_url":"https://api.github.com/users/TiagoCardoso1983/orgs","repos_url":"https://api.github.com/users/TiagoCardoso1983/repos","events_url":"https://api.github.com/users/TiagoCardoso1983/events{/privacy}","received_events_url":"https://api.github.com/users/TiagoCardoso1983/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T11:30:33Z","updated_at":"2016-09-27T11:30:33Z","body":"the first and second example are the same, the lookup is not influenced by the object being frozen or not. The difference of the 3rd in terms of performance is due to it using 4 O(1) rubyspace calls (`== || == || == || ==)` against 1 O(N) rubyspace call (`include?`) which is performed mostly in C. As stated in the comment earlier today, this case could be micro-optimized for the most common cases. try this as well:\r\n\r\n```\r\nbm.report do\r\n    100000000.times do\r\n      if t == 304 || t == 204 || t == 205 || (t >= 100 && t <= 199)\r\n      end\r\n    end\r\n  end\r\n```\r\n\r\nin the benchmark. "}}
{"actor":{"display_login":"TiagoCardoso1983"}}