{"comment":{"url":"https://api.github.com/repos/skywinder/github-changelog-generator/comments/14997581","html_url":"https://github.com/skywinder/github-changelog-generator/commit/3bc1e9b51abc4d2ebdc3d43eb12b9b1311a99713#commitcomment-14997581","id":14997581,"user":{"login":"olleolleolle","id":211,"avatar_url":"https://avatars.githubusercontent.com/u/211?v=3","gravatar_id":"","url":"https://api.github.com/users/olleolleolle","html_url":"https://github.com/olleolleolle","followers_url":"https://api.github.com/users/olleolleolle/followers","following_url":"https://api.github.com/users/olleolleolle/following{/other_user}","gists_url":"https://api.github.com/users/olleolleolle/gists{/gist_id}","starred_url":"https://api.github.com/users/olleolleolle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olleolleolle/subscriptions","organizations_url":"https://api.github.com/users/olleolleolle/orgs","repos_url":"https://api.github.com/users/olleolleolle/repos","events_url":"https://api.github.com/users/olleolleolle/events{/privacy}","received_events_url":"https://api.github.com/users/olleolleolle/received_events","type":"User","site_admin":false},"position":19,"line":18,"path":"Rakefile","commit_id":"3bc1e9b51abc4d2ebdc3d43eb12b9b1311a99713","created_at":"2015-12-15T21:12:25Z","updated_at":"2015-12-15T21:12:25Z","body":"I'm a big fan of the Pathname library, and perhaps it could be locally useful here:\r\n\r\n```ruby\r\nrequire 'pathname'\r\n\r\nprefix = Pathname(\"#{PREFIX}/share/man/man1\")\r\nPathname.glob(MAN_PAGES) do |path|\r\n  FileUtils.cp(path, prefix + path.basename)\r\nend\r\n```\r\n\r\n- the plus means \"File.join these two\"\r\n- many `File` class methods such as `#basename` are available as instance methods\r\n- there's a conversion function `Pathname` to turn strings into paths\r\n- it mostly works as well as a string would\r\n\r\nA pedantic comment: In this block, use local variables, not uppercase constants. We're not defining them for use anywhere else, right?"}}