]> git.donarmstrong.com Git - biopieces.git/commitdiff
tried to fix unit testing errs in test_genbank.rb
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Sat, 19 Feb 2011 15:27:44 +0000 (15:27 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Sat, 19 Feb 2011 15:27:44 +0000 (15:27 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1275 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/Maasha/lib/genbank.rb

index f83e8b7f5f490128395f0b2054989452d4dba25f..7abed69913645dca36c91b31836e3319a84c779e 100644 (file)
@@ -309,14 +309,14 @@ class Locator
   # table and fetches the appropriate subsequence. the operators
   # join(), complement(), and order() are handled.
   # the locator string is broken into a comma separated lists, and
-  # modified if the params donnot balance. otherwise the comma separated
+  # modified if the parens donnot balance. otherwise the comma separated
   # list of ranges are stripped from operators, and the subsequence are
   # fetched and handled according to the operators.
   # SNP locators are also dealt with (single positions).
   def parse_locator(locator, join = nil, comp = nil, order = nil)
     intervals = locator.split(",")
 
-    unless balance_params?(intervals.first)   # locator includes a join/comp/order of several ranges
+    unless balance_parens?(intervals.first)   # locator includes a join/comp/order of several ranges
       case locator
       when /^join\((.*)\)$/
         locator = $1
@@ -376,7 +376,7 @@ class Locator
     return @subseq
   end
 
-  def balance_params?(locator)
+  def balance_parens?(locator)
     parens = 0
 
     locator.each_char do |char|