{"action":"created","issue":{"url":"https://api.github.com/repos/iojs/io.js/issues/1260","labels_url":"https://api.github.com/repos/iojs/io.js/issues/1260/labels{/name}","comments_url":"https://api.github.com/repos/iojs/io.js/issues/1260/comments","events_url":"https://api.github.com/repos/iojs/io.js/issues/1260/events","html_url":"https://github.com/iojs/io.js/issues/1260","id":64242749,"number":1260,"title":"path: remove the check if string for `path.join`","user":{"login":"yorkie","id":1935767,"avatar_url":"https://avatars.githubusercontent.com/u/1935767?v=3","gravatar_id":"","url":"https://api.github.com/users/yorkie","html_url":"https://github.com/yorkie","followers_url":"https://api.github.com/users/yorkie/followers","following_url":"https://api.github.com/users/yorkie/following{/other_user}","gists_url":"https://api.github.com/users/yorkie/gists{/gist_id}","starred_url":"https://api.github.com/users/yorkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorkie/subscriptions","organizations_url":"https://api.github.com/users/yorkie/orgs","repos_url":"https://api.github.com/users/yorkie/repos","events_url":"https://api.github.com/users/yorkie/events{/privacy}","received_events_url":"https://api.github.com/users/yorkie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/iojs/io.js/labels/discuss","name":"discuss","color":"02d7e1"},{"url":"https://api.github.com/repos/iojs/io.js/labels/path","name":"path","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-25T11:02:36Z","updated_at":"2015-03-27T23:34:10Z","closed_at":null,"body":"The `path.join` would throw the error `TypeError: Arguments to path.join must be strings` when one of its arguments has a non-string value. But I have a case like the following code:\r\n\r\n```js\r\nimages.forEach(function (img, item) {\r\n  fs.rename(path.join(img.path, item));\r\n});\r\n```\r\n\r\nThis would throw this error like what i have said, why not call `toString` internally? Just proposal :)"},"comment":{"url":"https://api.github.com/repos/iojs/io.js/issues/comments/87121144","html_url":"https://github.com/iojs/io.js/issues/1260#issuecomment-87121144","issue_url":"https://api.github.com/repos/iojs/io.js/issues/1260","id":87121144,"user":{"login":"tellnes","id":613729,"avatar_url":"https://avatars.githubusercontent.com/u/613729?v=3","gravatar_id":"","url":"https://api.github.com/users/tellnes","html_url":"https://github.com/tellnes","followers_url":"https://api.github.com/users/tellnes/followers","following_url":"https://api.github.com/users/tellnes/following{/other_user}","gists_url":"https://api.github.com/users/tellnes/gists{/gist_id}","starred_url":"https://api.github.com/users/tellnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tellnes/subscriptions","organizations_url":"https://api.github.com/users/tellnes/orgs","repos_url":"https://api.github.com/users/tellnes/repos","events_url":"https://api.github.com/users/tellnes/events{/privacy}","received_events_url":"https://api.github.com/users/tellnes/received_events","type":"User","site_admin":false},"created_at":"2015-03-27T23:34:10Z","updated_at":"2015-03-27T23:34:10Z","body":"When I see that error it is usually a bug in my code and not some value I have forgotten to coerce to string.\r\n\r\nI do see the use case for numbers, but I don't think we should coerce for some types and throw for others.\r\n\r\nSo -1 from me for the reasons outlined by @petkaantonov"}}