{"action":"created","issue":{"url":"https://api.github.com/repos/whitequark/parser/issues/237","labels_url":"https://api.github.com/repos/whitequark/parser/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/whitequark/parser/issues/237/comments","events_url":"https://api.github.com/repos/whitequark/parser/issues/237/events","html_url":"https://github.com/whitequark/parser/pull/237","id":125330856,"number":237,"title":"Add Source::Buffer#lines","user":{"login":"alexdowad","id":1067359,"avatar_url":"https://avatars.githubusercontent.com/u/1067359?v=3","gravatar_id":"","url":"https://api.github.com/users/alexdowad","html_url":"https://github.com/alexdowad","followers_url":"https://api.github.com/users/alexdowad/followers","following_url":"https://api.github.com/users/alexdowad/following{/other_user}","gists_url":"https://api.github.com/users/alexdowad/gists{/gist_id}","starred_url":"https://api.github.com/users/alexdowad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexdowad/subscriptions","organizations_url":"https://api.github.com/users/alexdowad/orgs","repos_url":"https://api.github.com/users/alexdowad/repos","events_url":"https://api.github.com/users/alexdowad/events{/privacy}","received_events_url":"https://api.github.com/users/alexdowad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-07T06:20:40Z","updated_at":"2016-01-07T06:27:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/whitequark/parser/pulls/237","html_url":"https://github.com/whitequark/parser/pull/237","diff_url":"https://github.com/whitequark/parser/pull/237.diff","patch_url":"https://github.com/whitequark/parser/pull/237.patch"},"body":"@whitequark Please have a look at this and see if you want it. Commit log message:\r\n\r\nAlmost any application which processes Ruby source code will want to access\r\nspecific lines. `Buffer#source_line` is provided for that purpose; however,\r\nsometimes one wants an `Enumerable` object, which `#map`, `#select`, and so\r\non can be called on.\r\n\r\n`Parser::Source::Buffer` already maintains such an array, but it wasn't exposed.\r\nThis caused RuboCop to maintain its own array of lines for each `Buffer`,\r\nat a not-insignificant performance cost.\r\n\r\nExposing the `@lines` array to client code means that it and its contents must\r\nall be frozen to prevent unwanted mutation. This means that accessing source\r\nlines using `#lines` is more efficient than `#source_line`, since there is no\r\nextra copying."},"comment":{"url":"https://api.github.com/repos/whitequark/parser/issues/comments/169566757","html_url":"https://github.com/whitequark/parser/pull/237#issuecomment-169566757","issue_url":"https://api.github.com/repos/whitequark/parser/issues/237","id":169566757,"user":{"login":"whitequark","id":54771,"avatar_url":"https://avatars.githubusercontent.com/u/54771?v=3","gravatar_id":"","url":"https://api.github.com/users/whitequark","html_url":"https://github.com/whitequark","followers_url":"https://api.github.com/users/whitequark/followers","following_url":"https://api.github.com/users/whitequark/following{/other_user}","gists_url":"https://api.github.com/users/whitequark/gists{/gist_id}","starred_url":"https://api.github.com/users/whitequark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitequark/subscriptions","organizations_url":"https://api.github.com/users/whitequark/orgs","repos_url":"https://api.github.com/users/whitequark/repos","events_url":"https://api.github.com/users/whitequark/events{/privacy}","received_events_url":"https://api.github.com/users/whitequark/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T06:27:06Z","updated_at":"2016-01-07T06:27:06Z","body":"What about returning an enumerator instead?"}}