diff --git a/Rakefile b/Rakefile index 37fe42a..289e643 100644 --- a/Rakefile +++ b/Rakefile @@ -23,6 +23,6 @@ Rake::TestTask.new(:spec) do |t| t.test_files = FileList['spec/**/*_spec.rb'] end -# Rake::Task[:spec].enhance ['spec:rubocop'] +Rake::Task[:spec].enhance ['spec:rubocop'] task :default => :spec diff --git a/lib/mm2ep_depend/parser.rb b/lib/mm2ep_depend/parser.rb index bd9c4d8..96c52f2 100755 --- a/lib/mm2ep_depend/parser.rb +++ b/lib/mm2ep_depend/parser.rb @@ -20,11 +20,9 @@ module Mm2ep def initialize(str, value) @errors = [] @name = str - @value = case value - when /true/i then true - when /false/i then false - else value - end + @value = value + @value = true if value =~ /^true$/i + @value = false if value =~ /^false$/i return unless @value.nil? @errors << VarNotDefined.new( message: "No value for #{@name}",