summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-19 19:42:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-19 19:42:03 +0000
commit9664783fe06231ac77c6f2527bd95be318519ac4 (patch)
treedac56102455f22b45f164ba4d5c7468e61ef3128
parent04ff1791d573cba768b1ecda5418929e6b5a0cff (diff)
downloadruby-9664783fe06231ac77c6f2527bd95be318519ac4.tar.gz
ruby-9664783fe06231ac77c6f2527bd95be318519ac4.tar.xz
ruby-9664783fe06231ac77c6f2527bd95be318519ac4.zip
* test/ruby/test_marshal.rb (MarshalTestLib::test_exception): test
for [ruby-dev:22604]. * test/ruby/test_marshal.rb (MarshalTestLibtest_singleton): test for [ruby-dev:22588]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--test/ruby/test_marshal.rb13
2 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 30658f66a..7fa2d41a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Jan 20 04:41:58 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/ruby/test_marshal.rb (MarshalTestLib::test_exception): test
+ for [ruby-dev:22604].
+
+ * test/ruby/test_marshal.rb (MarshalTestLibtest_singleton): test
+ for [ruby-dev:22588].
+
Tue Jan 20 02:49:22 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/extconf.rb: add check for OpenSSL version.
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index ac804eb24..29ec895e5 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -58,6 +58,7 @@ module MarshalTestLib
class MyException < Exception; def initialize(v, *args) super(*args); @v = v; end; attr_reader :v; end
def test_exception
marshal_equal(Exception.new('foo')) {|o| o.message}
+ marshal_equal(assert_raise(NoMethodError) {no_such_method()}) {|o| o.message}
end
def test_exception_subclass
@@ -227,14 +228,16 @@ module MarshalTestLib
def test_singleton
o = Object.new
def o.m() end
- assert_raises(TypeError) { marshaltest(o) }
+ assert_raises(TypeError) { encode(o) }
o = Object.new
- class << o
+ c = class << o
@v = 1
+ class C; self; end
end
- assert_raises(TypeError) { marshaltest(o) }
- assert_raises(TypeError) { marshaltest(ARGF) }
- assert_raises(TypeError) { marshaltest(ENV) }
+ assert_raises(TypeError) { encode(o) }
+ assert_raises(TypeError) { encode(c) }
+ assert_raises(TypeError) { encode(ARGF) }
+ assert_raises(TypeError) { encode(ENV) }
end
module Mod1 end