[BioRuby-cvs] bioruby/lib/bio/sequence format.rb,1.4.2.2,1.4.2.3

Naohisa Goto ngoto at dev.open-bio.org
Fri Feb 15 02:18:24 UTC 2008


Update of /home/repository/bioruby/bioruby/lib/bio/sequence
In directory dev.open-bio.org:/tmp/cvs-serv25703/lib/bio/sequence

Modified Files:
      Tag: BRANCH-biohackathon2008
	format.rb 
Log Message:
special character in regexp should be escaped


Index: format.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/sequence/format.rb,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -C2 -d -r1.4.2.2 -r1.4.2.3
*** format.rb	14 Feb 2008 03:32:14 -0000	1.4.2.2
--- format.rb	15 Feb 2008 02:18:21 -0000	1.4.2.3
***************
*** 157,161 ****
        line = nil
        width.downto(1) do |i|
!         if left[i..i] == ' ' or /[,;]/ =~ left[(i-1)..(i-1)]  then
            line = left[0..(i-1)].sub(/ +\z/, '')
            left = left[i..-1].sub(/\A +/, '')
--- 157,161 ----
        line = nil
        width.downto(1) do |i|
!         if left[i..i] == ' ' or /[\,\;]/ =~ left[(i-1)..(i-1)]  then
            line = left[0..(i-1)].sub(/ +\z/, '')
            left = left[i..-1].sub(/\A +/, '')




More information about the bioruby-cvs mailing list