summaryrefslogtreecommitdiff
path: root/test/drb
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-16 15:30:52 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-16 15:30:52 +0000
commit8fd62dccb239887cf889e6ac1ef19c6c5c646efb (patch)
tree99107a9b1440db0ecc07b3bc599f7861b59bb364 /test/drb
parent482abfc851b86fa70482e70c828c56453677c58f (diff)
update unittest, port from v1.8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/drb')
-rw-r--r--test/drb/test_drb.rb8
-rw-r--r--test/drb/ut_safe1.rb1
2 files changed, 6 insertions, 3 deletions
diff --git a/test/drb/test_drb.rb b/test/drb/test_drb.rb
index a6b83d2..468c970 100644
--- a/test/drb/test_drb.rb
+++ b/test/drb/test_drb.rb
@@ -233,12 +233,16 @@ class TestDRbEval < Test::Unit::TestCase
remote_class = four.remote_class
+ assert_equal(1, remote_class.class_eval('1'))
+
+ assert_equal(1, remote_class.module_eval('1'))
+
assert_raises(SecurityError) do
- remote_class.class_eval('ENV.inspect')
+ remote_class.class_eval('ENV = {}')
end
assert_raises(SecurityError) do
- remote_class.module_eval('ENV.inspect')
+ remote_class.module_eval('ENV = {}')
end
end
end
diff --git a/test/drb/ut_safe1.rb b/test/drb/ut_safe1.rb
index 3ff8b4d..4df8e1e 100644
--- a/test/drb/ut_safe1.rb
+++ b/test/drb/ut_safe1.rb
@@ -8,7 +8,6 @@ if __FILE__ == $0
it
end
- $SAFE = 1
DRb.start_service('druby://localhost:0', [1, 2, 'III', 4, "five", 6],
{:safe_level => 1})
es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)