We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading gem from 0.4 to 0.6. Code no longer works since I call Document.open with a Pathname
Pathname
see example
require 'docx' pn = Pathname.new("/home/me/mydoc.docx") doc = Docx::Document.new(pn)
=> undefined method `close' for nil:NilClass
N/A
document object could be opened with a Pathname as in version 0.4
docx
The text was updated successfully, but these errors were encountered:
HI, Docx::Document.new does not support Pathname, expects the path to a docx file given as String.
Docx::Document.new
So the following code would work:
doc = Docx::Document.new("/home/me/mydoc.docx")
if you have any reason why you need to use Pathname instead of String, could you explain it?
Sorry, something went wrong.
Hi,
Since the major version number of the gem had not changed I thought the API-break was unintentional. Hence the report.
I noticed the issue with some old code using Pathname instead of String. But I can live without Pathname, no problem.
No branches or pull requests
Describe the bug
Upgrading gem from 0.4 to 0.6. Code no longer works since I call Document.open with a
Pathname
To Reproduce
see example
example
=> undefined method `close' for nil:NilClass
Sample docx file
N/A
Expected behavior
document object could be opened with a Pathname as in version 0.4
Environment
docx
gem version: [0.6.0The text was updated successfully, but these errors were encountered: