aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-23 05:32:46 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-23 05:32:46 +0000
commit0de2d84af82935ba01ba1d3328c9fdcf287bf3e1 (patch)
treed1b58d756f4bebf7f4fb9ab8a8ad1b8cf300ad5e /test
parentd514cd3ca0dedfd62e86698e53b4dc01dff75ed2 (diff)
downloadruby-0de2d84af82935ba01ba1d3328c9fdcf287bf3e1.tar.gz
Clean warnings: unused variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ripper/test_parser_events.rb4
-rw-r--r--test/ruby/test_objectspace.rb1
-rw-r--r--test/ruby/test_rubyoptions.rb2
-rw-r--r--test/ruby/test_thread.rb2
-rw-r--r--test/test_mathn.rb4
5 files changed, 7 insertions, 6 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 2ac623f76d..5d76941411 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -1097,8 +1097,8 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
assert_equal("[fcall(proc,[],&block([],[void()]))]", parse("proc{|;y|}"))
if defined?(Process::RLIMIT_AS)
assert_in_out_err(["-I#{File.dirname(__FILE__)}", "-rdummyparser"],
- 'Process.setrlimit(Process::RLIMIT_AS,102400); puts DummyParser.new("proc{|;y|}").parse',
- ["[fcall(proc,[],&block([],[void()]))]"], [], '[ruby-dev:39423]')
+ 'Process.setrlimit(Process::RLIMIT_AS,102400); puts DummyParser.new("proc{|;y|!y}").parse',
+ ["[fcall(proc,[],&block([],[unary(!,ref(y))]))]"], [], '[ruby-dev:39423]')
end
end
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb
index 571c725986..24731a7a50 100644
--- a/test/ruby/test_objectspace.rb
+++ b/test/ruby/test_objectspace.rb
@@ -61,6 +61,7 @@ End
ObjectSpace.define_finalizer(a) { p :ok }
b = a.dup
ObjectSpace.define_finalizer(a) { p :ok }
+ !b
END
assert_raise(ArgumentError) { ObjectSpace.define_finalizer([], Object.new) }
end
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 65e692ecc0..5befa465a3 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -182,7 +182,7 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_syntax_check
- assert_in_out_err(%w(-c -e a=1+1), "", ["Syntax OK"], [])
+ assert_in_out_err(%w(-c -e a=1+1 -e !a), "", ["Syntax OK"], [])
end
def test_invalid_option
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 3c10cce3c3..0322448c71 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -231,7 +231,7 @@ class TestThread < Test::Unit::TestCase
t1 = Thread.new { sleep }
Thread.pass
t2 = Thread.new { loop { } }
- t3 = Thread.new { }.join
+ Thread.new { }.join
p [Thread.current, t1, t2].map{|t| t.object_id }.sort
p Thread.list.map{|t| t.object_id }.sort
INPUT
diff --git a/test/test_mathn.rb b/test/test_mathn.rb
index d36985378b..f511adb7d5 100644
--- a/test/test_mathn.rb
+++ b/test/test_mathn.rb
@@ -4,7 +4,7 @@ require_relative 'ruby/envutil'
# mathn redefines too much. It must be isolated to child processes.
class TestMathn < Test::Unit::TestCase
def test_power
- assert_in_out_err ['-r', 'mathn', '-e', 'a=1**2'], "", [], [], '[ruby-core:25740]'
- assert_in_out_err ['-r', 'mathn', '-e', 'a=(1<<126)**2'], "", [], [], '[ruby-core:25740]'
+ assert_in_out_err ['-r', 'mathn', '-e', 'a=1**2;!a'], "", [], [], '[ruby-core:25740]'
+ assert_in_out_err ['-r', 'mathn', '-e', 'a=(1<<126)**2;!a'], "", [], [], '[ruby-core:25740]'
end
end