From bdabedfe7055ee17e053b4eccc03855a439807cc Mon Sep 17 00:00:00 2001 From: Daz Oakley Date: Wed, 16 Feb 2011 11:48:05 +0000 Subject: [PATCH] Minor bugfix - you can't .downcase a true/false value... --- lib/biomart/dataset.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/biomart/dataset.rb b/lib/biomart/dataset.rb index 2d3593f..175fc01 100644 --- a/lib/biomart/dataset.rb +++ b/lib/biomart/dataset.rb @@ -251,9 +251,10 @@ def dataset_xml( xml, dataset, args ) raise Biomart::ArgumentError, "The filter '#{name}' does not exist" if dataset.filters[name].nil? if dataset.filters[name].type == 'boolean' - if [true,'included','only'].include?(value.downcase) + value = value.downcase if value.is_a? String + if [true,'included','only'].include?(value) xml.Filter( :name => name, :excluded => '0' ) - elsif [false,'excluded'].include?(value.downcase) + elsif [false,'excluded'].include?(value) xml.Filter( :name => name, :excluded => '1' ) else raise Biomart::ArgumentError, "The boolean filter '#{name}' can only accept 'true/included/only' or 'false/excluded' arguments."