[BioRuby-cvs] bioruby/lib/bio/io keggapi.rb,1.7,1.8

Katayama Toshiaki k at pub.open-bio.org
Sun Aug 7 05:49:25 EDT 2005


Update of /home/repository/bioruby/bioruby/lib/bio/io
In directory pub.open-bio.org:/tmp/cvs-serv27017/lib/bio/io

Modified Files:
	keggapi.rb 
Log Message:
* fixed to avoid adding nil to string


Index: keggapi.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/io/keggapi.rb,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** keggapi.rb	24 Aug 2004 00:07:28 -0000	1.7
--- keggapi.rb	7 Aug 2005 09:49:22 -0000	1.8
***************
*** 42,46 ****
  
    def method_missing(*arg)
!     results = @driver.send(*arg)
      results = add_filter(results)
      return results
--- 42,50 ----
  
    def method_missing(*arg)
!     begin
!       results = @driver.send(*arg)
!     rescue Timeout::Error
!       retry
!     end
      results = add_filter(results)
      return results
***************
*** 106,110 ****
      0.step(ary.length, step) do |i|
        str = ary[i, step].join(" ")
!       result << @driver.send(:bget, str)
      end
      return result
--- 110,116 ----
      0.step(ary.length, step) do |i|
        str = ary[i, step].join(" ")
!       if entry = @driver.send(:bget, str)
!         result << entry.to_s
!       end
      end
      return result
***************
*** 116,120 ****
      0.step(ary.length, step) do |i|
        str = "-f -n a " + ary[i, step].join(" ")
!       result << @driver.send(:bget, str)
      end
      return result
--- 122,128 ----
      0.step(ary.length, step) do |i|
        str = "-f -n a " + ary[i, step].join(" ")
!       if entry = @driver.send(:bget, str)
!         result << entry.to_s
!       end
      end
      return result
***************
*** 126,130 ****
      0.step(ary.length, step) do |i|
        str = "-f -n n " + ary[i, step].join(" ")
!       result << @driver.send(:bget, str)
      end
      return result
--- 134,140 ----
      0.step(ary.length, step) do |i|
        str = "-f -n n " + ary[i, step].join(" ")
!       if entry = @driver.send(:bget, str)
!         result << entry.to_s
!       end
      end
      return result
***************
*** 136,140 ****
      0.step(ary.length, step) do |i|
        str = ary[i, step].join(" ")
!       result << @driver.send(:btit, str)
      end
      return result
--- 146,152 ----
      0.step(ary.length, step) do |i|
        str = ary[i, step].join(" ")
!       if entry = @driver.send(:bget, str)
!         result << entry.to_s
!       end
      end
      return result



More information about the bioruby-cvs mailing list