[BioRuby-cvs] bioruby/lib/bio db.rb,0.31,0.32

Katayama Toshiaki k at pub.open-bio.org
Thu Jan 12 03:58:29 EST 2006


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

Modified Files:
	db.rb 
Log Message:
* fixed bug of tag_cut method (included in bioruby 0.7.0 release...)


Index: db.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db.rb,v
retrieving revision 0.31
retrieving revision 0.32
diff -C2 -d -r0.31 -r0.32
*** db.rb	7 Dec 2005 11:23:51 -0000	0.31
--- db.rb	12 Jan 2006 08:58:27 -0000	0.32
***************
*** 211,237 ****
    # space and stripeed.
    def truncate(str)
!     if str
!       str.gsub(/\s+/, ' ').strip
!     else
!       ""
!     end
    end
  
    # Returns a tag name of the field as a String.
    def tag_get(str)
!     if str
!       str[0, at tagsize].strip
!     else
!       ""
!     end
    end
  
    # Returns a String of the field without a tag name.
    def tag_cut(str)
!     if str
!       str[0, at tagsize] = ''
!     else
!       ""
!     end
    end
  
--- 211,229 ----
    # space and stripeed.
    def truncate(str)
!     str ||= ""
!     return str.gsub(/\s+/, ' ').strip
    end
  
    # Returns a tag name of the field as a String.
    def tag_get(str)
!     str ||= ""
!     return str[0, at tagsize].strip
    end
  
    # Returns a String of the field without a tag name.
    def tag_cut(str)
!     str ||= ""
!     str[0, at tagsize] = ''
!     return str
    end
  



More information about the bioruby-cvs mailing list