lib/thermite/util.rb in thermite-0.6.0 vs lib/thermite/util.rb in thermite-0.7.0
- old
+ new
@@ -26,12 +26,12 @@
#
# Logs a debug message to the specified `config.debug_filename`, if set.
#
def debug(msg)
# Should probably replace with a Logger
- if config.debug_filename
- @debug ||= File.open(config.debug_filename, 'w')
- @debug.write("#{msg}\n")
- end
+ return unless config.debug_filename
+
+ @debug ||= File.open(config.debug_filename, 'w')
+ @debug.write("#{msg}\n")
end
end
end