got rid of nasty to_sym in biopieces.rb
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 22 Nov 2011 15:24:57 +0000 (15:24 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 22 Nov 2011 15:24:57 +0000 (15:24 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1678 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/lib/maasha/biopieces.rb
code_ruby/test/maasha/test_biopieces.rb

index 1d1deb55e1daf4a05f798e51071eca68ea441641..7b42b548d333b619bbe8301e0ee962bfeaa8d1b3 100644 (file)
@@ -355,7 +355,7 @@ class OptionHandler
           end
         when 'string'
           option.on("-#{cast[:short]}", "--#{cast[:long]} S", String) do |s|
-            @options[cast[:long]] = s.to_sym  # TODO: this to_sym - is that needed?
+            @options[cast[:long]] = s
           end
         when REGEX_LIST
           option.on( "-#{cast[:short]}", "--#{cast[:long]} A", Array) do |a|
index af339678132fb0613c97db640ac2881062a6ace6..cc77410a8c4c788a72342612b6067ddd0bd28c46 100755 (executable)
@@ -231,7 +231,7 @@ class BiopiecesTest < Test::Unit::TestCase
      argv    = ["--foo", "bleh", "-I", DUMMY_FILE]
      casts   = [{:long=>"foo", :short=>"f", :type=>"string", :mandatory=>false, :default=>"bar", :allowed=>nil, :disallowed=>nil}]
      options = Biopieces.options_parse(argv, casts, SCRIPT_PATH)
-     assert_equal(options[:foo], "bleh".to_sym)
+     assert_equal(options[:foo], "bleh")
    end
  
    def test_Biopieces_options_parse_with_mandatory_cast_and_no_argument_raises