diff options
-rwxr-xr-x | bin/custodian-dequeue | 2 | ||||
-rwxr-xr-x | bin/custodian-enqueue | 2 | ||||
-rwxr-xr-x | bin/custodian-queue | 2 | ||||
-rwxr-xr-x | bin/multi-ping | 2 | ||||
-rw-r--r-- | lib/custodian/protocoltest/tcp.rb | 2 | ||||
-rwxr-xr-x | t/test-suite | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue index 46a62da..349ff31 100755 --- a/bin/custodian-dequeue +++ b/bin/custodian-dequeue @@ -57,7 +57,7 @@ require 'custodian/worker' # # Entry-point to our code. # -if __FILE__ == $0 then +if __FILE__ == $PROGRAM_NAME then $help = false $manual = false diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue index 86c253f..75d38ac 100755 --- a/bin/custodian-enqueue +++ b/bin/custodian-enqueue @@ -63,7 +63,7 @@ require 'custodian/settings' # # Entry-point to our code. # -if __FILE__ == $0 then +if __FILE__ == $PROGRAM_NAME then $help = false $manual = false diff --git a/bin/custodian-queue b/bin/custodian-queue index 978cbda..ed2c3be 100755 --- a/bin/custodian-queue +++ b/bin/custodian-queue @@ -52,7 +52,7 @@ require 'custodian/queue' # # Entry-point to our code. # -if __FILE__ == $0 then +if __FILE__ == $PROGRAM_NAME then $FLUSH = false $STATS = false diff --git a/bin/multi-ping b/bin/multi-ping index ef14c4c..00ae466 100755 --- a/bin/multi-ping +++ b/bin/multi-ping @@ -106,7 +106,7 @@ hostname = ARGV.shift # Abort if we don't have a hostname # if ( hostname.nil? ) - puts "Usage: #{$0} hostname" + puts "Usage: #{$PROGRAM_NAME} hostname" exit 1 end diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb index 3fd4129..d0da3a3 100644 --- a/lib/custodian/protocoltest/tcp.rb +++ b/lib/custodian/protocoltest/tcp.rb @@ -309,7 +309,7 @@ module Custodian return false end rescue - @error = "Exception connecting to host #{host}:#{port} - #{$!}" + @error = "Exception connecting to host #{host}:#{port} - #{$ERROR_INFO}" return false end end diff --git a/t/test-suite b/t/test-suite index 9500052..02df298 100755 --- a/t/test-suite +++ b/t/test-suite @@ -11,7 +11,7 @@ # base = File.dirname(__FILE__) %w(bin lib .).each do |d| - $: << File.expand_path(File.join(base, "../#{d}")) + $LOAD_PATH << File.expand_path(File.join(base, "../#{d}")) end require 'test/unit' |