Browse Source

Corrected with rubocop cop 'Style/GlobalVars'.

Thorsten Eckel 9 years ago
parent
commit
c1c35ce39e
2 changed files with 4 additions and 6 deletions
  1. 0 2
      .rubocop.yml
  2. 4 4
      script/websocket-server.rb

+ 0 - 2
.rubocop.yml

@@ -187,8 +187,6 @@ Style/Documentation:
 
 Style/CommentIndentation:
   Enabled: false
-Style/GlobalVars:
-  Enabled: false
 Lint/RescueException:
   Enabled: false
 Style/ClassVars:

+ 4 - 4
script/websocket-server.rb

@@ -76,10 +76,10 @@ if ARGV[0] == 'start' && @options[:d]
   Daemons.daemonize
 
   # create pid file
-  $daemon_pid = File.new( @options[:i].to_s, 'w' )
-  $daemon_pid.sync = true
-  $daemon_pid.puts(Process.pid.to_s)
-  $daemon_pid.close
+  daemon_pid = File.new( @options[:i].to_s, 'w' )
+  daemon_pid.sync = true
+  daemon_pid.puts(Process.pid.to_s)
+  daemon_pid.close
 end
 
 @clients = {}