{"action":"closed","issue":{"url":"https://api.github.com/repos/rcairo/rcairo/issues/37","labels_url":"https://api.github.com/repos/rcairo/rcairo/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/rcairo/rcairo/issues/37/comments","events_url":"https://api.github.com/repos/rcairo/rcairo/issues/37/events","html_url":"https://github.com/rcairo/rcairo/issues/37","id":74182741,"number":37,"title":"Can't specify path of PDFSurface as Pathname object","user":{"login":"scivola","id":294125,"avatar_url":"https://avatars.githubusercontent.com/u/294125?v=3","gravatar_id":"","url":"https://api.github.com/users/scivola","html_url":"https://github.com/scivola","followers_url":"https://api.github.com/users/scivola/followers","following_url":"https://api.github.com/users/scivola/following{/other_user}","gists_url":"https://api.github.com/users/scivola/gists{/gist_id}","starred_url":"https://api.github.com/users/scivola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scivola/subscriptions","organizations_url":"https://api.github.com/users/scivola/orgs","repos_url":"https://api.github.com/users/scivola/repos","events_url":"https://api.github.com/users/scivola/events{/privacy}","received_events_url":"https://api.github.com/users/scivola/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-08T01:11:32Z","updated_at":"2015-05-08T12:15:53Z","closed_at":"2015-05-08T12:15:53Z","body":"The following script fails to create a valid PDF file.\r\n\r\n```rb\r\nrequire 'pathname'\r\nrequire 'cairo'\r\n\r\nsurface = Cairo::PDFSurface.new Pathname(\"sample.pdf\"), 100, 100\r\ncontext = Cairo::Context.new surface\r\n\r\ncontext.move_to 10, 10\r\ncontext.line_to 90, 90\r\ncontext.stroke\r\n\r\ncontext.show_page\r\n\r\nsurface.finish\r\n```\r\n\r\nThe content of sample.pdf is merely '%EOF'.\r\n\r\nWhy?\r\n\r\nIf we change the first argument of PDFSurface.new to String instead of Pathname, it is okay.\r\n\r\nPathname object has `write` method, but ...\r\n\r\nEnvironment:\r\nruby 2.1.6p336 (2015-04-13 revision 50298) [i386-mingw32]\r\ncairo (1.14.1 x86-mingw32)"}}