Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
Make is_windows a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Klortho committed Dec 8, 2013
1 parent 1c9731c commit 5e3135d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/mailman/application.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require 'rbconfig'

module Mailman
IS_WINDOWS = (RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i)

# The main application class. Pass a block to {#new} to create a new app.
class Application

Expand Down Expand Up @@ -32,7 +34,6 @@ def initialize(config=:default, &block)
@router = Mailman::Router.new
@config = select_config(config)
@processor = MessageProcessor.new(:router => @router, :config => @config)
@is_windows = (RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i)

if self.config.maildir
require 'maildir'
Expand Down Expand Up @@ -69,7 +70,7 @@ def run
end

# STDIN
if !@is_windows && !config.ignore_stdin && $stdin.fcntl(Fcntl::F_GETFL, 0) == 0
if !IS_WINDOWS && !config.ignore_stdin && $stdin.fcntl(Fcntl::F_GETFL, 0) == 0
Mailman.logger.debug "Processing message from STDIN."
@processor.process($stdin.read)

Expand Down

0 comments on commit 5e3135d

Please sign in to comment.