about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-19 23:57:22 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-20 00:09:04 +0000
commit04b664092b02e021a6b43f1869fe0ed2efc12dd8 (patch)
treec4f753ca1819db8ec608ea1a8e0f54e7873a81a5
parenta108236d619c950add6d5a8331450180a506c6ea (diff)
downloadyahns-04b664092b02e021a6b43f1869fe0ed2efc12dd8.tar.gz
openssl warns about an unused variable
-rw-r--r--GNUmakefile4
-rw-r--r--test/helper.rb1
2 files changed, 3 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 36fd8a4..97f68d5 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -12,11 +12,11 @@ all:: test
 test_units := $(wildcard test/test_*.rb)
 test: $(test_units)
 $(test_units):
-        $(RUBY) -w -I $(lib) $@ -v
+        $(RUBY) -I $(lib) $@ -v
 
 test-mt: export N = $(shell nproc 2>/dev/null || echo 4)
 test-mt:
-        $(RUBY) -w -I $(lib) $(addprefix -r./,$(test_units)) -eTime.now --
+        $(RUBY) -I $(lib) $(addprefix -r./,$(test_units)) -eTime.now --
 
 check-warnings:
         @(for i in $$(git ls-files '*.rb'| grep -v '^setup\.rb$$'); \
diff --git a/test/helper.rb b/test/helper.rb
index 896377f..626a046 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -1,6 +1,7 @@
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 $stdout.sync = $stderr.sync = Thread.abort_on_exception = true
+$-w = true if RUBY_VERSION.to_f >= 2.0
 require 'thread'
 
 # Global Test Lock, to protect: