Skip to content

Commit

Permalink
Bug fix: Bio::PubMed#efetch should return an array of string objects.
Browse files Browse the repository at this point in the history
 * Bug fix: Bio::PubMed#efetch should return an array of string
   objects. Thanks to Masahide Kikkawa and Fredrik Johansson
   who report the bug (in "[BioRuby] Bio::PubMed.efetch, bug?"
   and "[BioRuby] PubMed.efetch error").
  • Loading branch information
ngoto committed Apr 21, 2009
1 parent fc0339f commit a48a9a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/bio/io/pubmed.rb
Expand Up @@ -117,7 +117,11 @@ def esearch(str, hash = {})
def efetch(ids, hash = {})
opts = { "db" => "pubmed", "rettype" => "medline" }
opts.update(hash)
super(ids, opts)
result = super(ids, opts)
if !opts["retmode"] or opts["retmode"] == "text"
result = result.split(/\n\n+/)
end
result
end

# Search the PubMed database by given keywords using entrez query and returns
Expand Down

0 comments on commit a48a9a3

Please sign in to comment.