From 72453a3df7c4ad0e893c0bf5ef96f414eefc2b84 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Sat, 19 Feb 2011 15:27:44 +0000 Subject: [PATCH] tried to fix unit testing errs in test_genbank.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1275 74ccb610-7750-0410-82ae-013aeee3265d --- code_ruby/Maasha/lib/genbank.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code_ruby/Maasha/lib/genbank.rb b/code_ruby/Maasha/lib/genbank.rb index f83e8b7..7abed69 100644 --- a/code_ruby/Maasha/lib/genbank.rb +++ b/code_ruby/Maasha/lib/genbank.rb @@ -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| -- 2.39.5