[BioRuby-cvs] bioruby/lib/bio/db/pdb pdb.rb,1.13,1.14

Naohisa Goto ngoto at pub.open-bio.org
Sun Jan 29 06:48:41 UTC 2006


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

Modified Files:
	pdb.rb 
Log Message:
changed "str" to "str.to_s" to improve tolerance to wrong or incomplete data


Index: pdb.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/pdb/pdb.rb,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** pdb.rb	20 Jan 2006 13:54:08 -0000	1.13
--- pdb.rb	29 Jan 2006 06:48:39 -0000	1.14
***************
*** 87,91 ****
        module Pdb_SList
          def self.new(str)
!           str.strip.split(/\;\s*/)
          end
        end
--- 87,91 ----
        module Pdb_SList
          def self.new(str)
!           str.to_s.strip.split(/\;\s*/)
          end
        end
***************
*** 93,97 ****
        module Pdb_List
          def self.new(str)
!           str.strip.split(/\,\s*/)
          end
        end
--- 93,97 ----
        module Pdb_List
          def self.new(str)
!           str.to_s.strip.split(/\,\s*/)
          end
        end
***************
*** 99,103 ****
        module Pdb_Specification_list
          def self.new(str)
!           a = str.strip.split(/\;\s*/)
            a.collect! { |x| x.split(/\:\s*/, 2) }
            a
--- 99,103 ----
        module Pdb_Specification_list
          def self.new(str)
!           a = str.to_s.strip.split(/\;\s*/)
            a.collect! { |x| x.split(/\:\s*/, 2) }
            a
***************
*** 107,111 ****
        module Pdb_String
          def self.new(str)
!           str.gsub(/\s+\z/, '')
          end
  
--- 107,111 ----
        module Pdb_String
          def self.new(str)
!           str.to_s.gsub(/\s+\z/, '')
          end
  
***************
*** 117,121 ****
              @@nn = nn
              def self.new(str)
!               str.gsub(/\s+\z/, '').ljust(@@nn)[0, @@nn]
              end
            }
--- 117,121 ----
              @@nn = nn
              def self.new(str)
!               str.to_s.gsub(/\s+\z/, '').ljust(@@nn)[0, @@nn]
              end
            }
***************
*** 130,134 ****
              @@nn = nn
              def self.new(str)
!               str.ljust(@@nn)[0, @@nn]
              end
            }
--- 130,134 ----
              @@nn = nn
              def self.new(str)
!               str.to_s.ljust(@@nn)[0, @@nn]
              end
            }
***************
*** 158,162 ****
        module Pdb_StringRJ
          def self.new(str)
!           str.gsub(/\A\s+/, '')
          end
        end
--- 158,162 ----
        module Pdb_StringRJ
          def self.new(str)
!           str.to_s.gsub(/\A\s+/, '')
          end
        end




More information about the bioruby-cvs mailing list