Permalink
Browse files

Don't try to intern the empty string.

  • Loading branch information...
1 parent 5611cbc commit 5c613f197e95e996b86b5fd4adab6d6f80fbc9a1 @ConradIrwin ConradIrwin committed Jul 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/perftools_profiler/profile_data_action.rb
@@ -9,7 +9,7 @@ def check_printer_arg
end
def self.check_printer(printer, env=nil)
- if printer != nil && !ProfilerMiddleware::PRINTERS.member?(printer.to_sym)
+ if printer != nil && printer != '' && !ProfilerMiddleware::PRINTERS.member?(printer.to_sym)
message = "Invalid printer type: #{printer}. Valid printer values are #{ProfilerMiddleware::PRINTERS.join(", ")}"
raise ProfilerArgumentError, message
end

0 comments on commit 5c613f1

Please sign in to comment.