Skip to content
New issue

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

fix #84 check if the filename is String #118

Merged
merged 4 commits into from
Aug 4, 2014
Merged

Conversation

nobuf
Copy link
Contributor

@nobuf nobuf commented Mar 6, 2014

filename could be Tempfile, for instance. To make #84 case working, you may need to add file_warning: :warning when initialize the instance since Tempfile's filename has no extension. Roo::Excelx.new(params[:file].tempfile, file_warning: :ignore)

@@ -623,7 +623,7 @@ def normalize(row,col)
end

def uri?(filename)
filename.start_with?("http://", "https://")
filename.is_a? String and filename.start_with?("http://", "https://")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to use try instead of calling is_a? and using and

simonoff added a commit that referenced this pull request Aug 4, 2014
fix #84 check if the filename is String
@simonoff simonoff merged commit daeb688 into roo-rb:master Aug 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants