aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-24 09:57:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-24 09:57:53 +0000
commit4e183b11acebdbce9fe843059ddb8e18e491cce1 (patch)
treea6cd8b6ecfb5e2f52f04cbbe29e4fd9f3adbd59e /test
parent99ab1fed49ba6b441fa5a6ae3d6818fae09b760e (diff)
downloadruby-4e183b11acebdbce9fe843059ddb8e18e491cce1.tar.gz
* test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.
* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize): initialize @workdir to stop warning. * lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): replace funcall by send!. other files in the distribution as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/pathname/test_pathname.rb2
-rw-r--r--test/ruby/test_alias.rb2
-rw-r--r--test/ruby/test_dir.rb8
-rw-r--r--test/ruby/test_eval.rb4
-rw-r--r--test/ruby/test_primitive.rb2
-rw-r--r--test/socket/test_socket.rb8
-rw-r--r--test/socket/test_udp.rb4
7 files changed, 15 insertions, 15 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index ecf7a71be5..21a3ba68ac 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -12,7 +12,7 @@ class TestPathname < Test::Unit::TestCase
if RUBY_VERSION < "1.9"
FUNCALL = :__send__
else
- FUNCALL = :funcall
+ FUNCALL = :send!
end
def self.define_assertion(name, &block)
diff --git a/test/ruby/test_alias.rb b/test/ruby/test_alias.rb
index 18a7d475e2..4076de051b 100644
--- a/test/ruby/test_alias.rb
+++ b/test/ruby/test_alias.rb
@@ -56,7 +56,7 @@ class TestAlias < Test::Unit::TestCase
d = lambda {
$SAFE = 4
dclass = Class.new(C)
- dclass.funcall(:alias_method, :mm, :m)
+ dclass.send!(:alias_method, :mm, :m)
dclass.new
}.call
assert_raise(SecurityError) { d.mm }
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index c419bd8d4e..164f13f716 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -10,10 +10,10 @@ class TestDir < Test::Unit::TestCase
def setup
Dir.mkdir(ROOT)
for i in ?a..?z
- if i % 2 == 0
- FileUtils.touch(File.join(ROOT, i.chr))
+ if i.ord % 2 == 0
+ FileUtils.touch(File.join(ROOT, i))
else
- FileUtils.mkdir(File.join(ROOT, i.chr))
+ FileUtils.mkdir(File.join(ROOT, i))
end
end
end
@@ -31,7 +31,7 @@ class TestDir < Test::Unit::TestCase
break unless name = dir.read
cache << [pos, name]
end
- for x,y in cache.sort_by {|x| x[0] % 3 } # shuffle
+ for x,y in cache.sort_by {|z| z[0] % 3 } # shuffle
dir.seek(x)
assert_equal(y, dir.read)
end
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb
index e79d1c82ec..22cc4456d3 100644
--- a/test/ruby/test_eval.rb
+++ b/test/ruby/test_eval.rb
@@ -124,7 +124,7 @@ class TestEval < Test::Unit::TestCase
obj.class.class_variable_set :@@cvar, 13
# Use same value with env. See also test_instance_variable_cvar.
obj.class.const_set :Const, 15 unless obj.class.const_defined?(:Const)
- funcall mid, obj
+ send! mid, obj
end
end
@@ -364,7 +364,7 @@ class TestEval < Test::Unit::TestCase
assert_nothing_raised {
def temporally_method_for_test_eval_and_define_method(&block)
lambda {
- class << Object.new; self end.funcall(:define_method, :zzz, &block)
+ class << Object.new; self end.send!(:define_method, :zzz, &block)
}
end
v = eval("temporally_method_for_test_eval_and_define_method {}")
diff --git a/test/ruby/test_primitive.rb b/test/ruby/test_primitive.rb
index 85a8be9f94..68c53b0bd7 100644
--- a/test/ruby/test_primitive.rb
+++ b/test/ruby/test_primitive.rb
@@ -50,7 +50,7 @@ class TestRubyPrimitive < Test::Unit::TestCase
assert_equal 3, A::B::C::Const
assert_equal 3, A::B::C.new.const
assert_equal 1, ::TestRubyPrimitive::A::Const
- A::B::C.funcall(:remove_const, :Const)
+ A::B::C.send!(:remove_const, :Const)
assert_equal 2, A::B::C.new.const
assert_raise(TypeError) {
C::CONST
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 00a16b1529..dc61ede9d7 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -19,7 +19,7 @@ class TestBasicSocket < Test::Unit::TestCase
n = s.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
assert_equal([0].pack("i"), n)
val = Object.new
- class << val; self end.funcall(:define_method, :to_int) {
+ class << val; self end.send!(:define_method, :to_int) {
s.close
Socket::SO_TYPE
}
@@ -34,7 +34,7 @@ class TestBasicSocket < Test::Unit::TestCase
linger = [0, 0].pack("ii")
val = Object.new
- class << val; self end.funcall(:define_method, :to_str) {
+ class << val; self end.send!(:define_method, :to_str) {
s.close
linger
}
@@ -47,7 +47,7 @@ class TestBasicSocket < Test::Unit::TestCase
end
val = Object.new
- class << val; self end.funcall(:define_method, :to_int) {
+ class << val; self end.send!(:define_method, :to_int) {
s.close
Socket::SO_LINGER
}
@@ -61,7 +61,7 @@ class TestBasicSocket < Test::Unit::TestCase
def test_listen
s = nil
log = Object.new
- class << log; self end.funcall(:define_method, :to_int) {
+ class << log; self end.send!(:define_method, :to_int) {
s.close
2
}
diff --git a/test/socket/test_udp.rb b/test/socket/test_udp.rb
index 22eee783dd..654b506573 100644
--- a/test/socket/test_udp.rb
+++ b/test/socket/test_udp.rb
@@ -9,7 +9,7 @@ class TestUDPSocket < Test::Unit::TestCase
def test_connect # [ruby-dev:25045]
s = UDPSocket.new
host = Object.new
- class << host; self end.funcall(:define_method, :to_str) {
+ class << host; self end.send!(:define_method, :to_str) {
s.close
"127.0.0.1"
}
@@ -21,7 +21,7 @@ class TestUDPSocket < Test::Unit::TestCase
def test_bind # [ruby-dev:25057]
s = UDPSocket.new
host = Object.new
- class << host; self end.funcall(:define_method, :to_str) {
+ class << host; self end.send!(:define_method, :to_str) {
s.close
"127.0.0.1"
}