{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/nexpose-client/issues/249","repository_url":"https://api.github.com/repos/rapid7/nexpose-client","labels_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/249/comments","events_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/249/events","html_url":"https://github.com/rapid7/nexpose-client/pull/249","id":179292256,"number":249,"title":"ensure single_ip is cast #to_s before comparison","user":{"login":"ryanbreed","id":462935,"avatar_url":"https://avatars.githubusercontent.com/u/462935?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbreed","html_url":"https://github.com/ryanbreed","followers_url":"https://api.github.com/users/ryanbreed/followers","following_url":"https://api.github.com/users/ryanbreed/following{/other_user}","gists_url":"https://api.github.com/users/ryanbreed/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbreed/subscriptions","organizations_url":"https://api.github.com/users/ryanbreed/orgs","repos_url":"https://api.github.com/users/ryanbreed/repos","events_url":"https://api.github.com/users/ryanbreed/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbreed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-26T17:43:47Z","updated_at":"2016-10-04T15:12:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rapid7/nexpose-client/pulls/249","html_url":"https://github.com/rapid7/nexpose-client/pull/249","diff_url":"https://github.com/rapid7/nexpose-client/pull/249.diff","patch_url":"https://github.com/rapid7/nexpose-client/pull/249.patch"},"body":"the include? method incorrectly initializes a local variable 'other' from its called argument single_ip\r\n\r\n## Description\r\nNexpose::IPRange#include? expects to be passed another Nexpose::IPRange instance for its comparison logic. It instantiates a local IPAddr object from this argument without first casting to a compatible type. This is probably incorrect behavior in some versions of core runtime.\r\n\r\nThis is a quick & dirty hack that doesn't affect any of the class internal representation, local initialization or comparison logic.\r\n\r\n## Motivation and Context\r\n[IPRange include? function error #240](https://github.com/rapid7/nexpose-client/issues/240)\r\n\r\n## How Has This Been Tested?\r\n    12:28 $ bundle exec rspec\r\n    ..................................................\r\n    Finished in 0.35073 seconds (files took 0.48575 seconds to load)\r\n    50 examples, 0 failures\r\n\r\n## Types of changes\r\n- Bug fix (non-breaking change which fixes an issue)\r\n\r\n## Checklist:\r\n- [x] I have updated the documentation accordingly (if changes are required).\r\n- [ ] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rapid7/nexpose-client/issues/comments/251417909","html_url":"https://github.com/rapid7/nexpose-client/pull/249#issuecomment-251417909","issue_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/249","id":251417909,"user":{"login":"ryanbreed","id":462935,"avatar_url":"https://avatars.githubusercontent.com/u/462935?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbreed","html_url":"https://github.com/ryanbreed","followers_url":"https://api.github.com/users/ryanbreed/followers","following_url":"https://api.github.com/users/ryanbreed/following{/other_user}","gists_url":"https://api.github.com/users/ryanbreed/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbreed/subscriptions","organizations_url":"https://api.github.com/users/ryanbreed/orgs","repos_url":"https://api.github.com/users/ryanbreed/repos","events_url":"https://api.github.com/users/ryanbreed/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbreed/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T15:12:22Z","updated_at":"2016-10-04T15:12:22Z","body":"@gschneider-r7 [here's](https://github.com/ryanbreed/nexpose-client/commit/1dab15106f10a83ec442c8140927812d18f02dbc#diff-3fea812f2b4846960ba6aa2bc21ec15a) what that's starting to look like without a reimplementation of IPRange. i'm thinking about switching on called type and re-calling if it's castable to something useful. i'll benchmark if i can."}}
{"actor":{"display_login":"ryanbreed"}}