From 45c322bfdb3f6d38a006aef9ce3e4654db9bc8ed Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 25 Nov 2009 08:41:36 +0000 Subject: merge revision(s) 22372: * test/ostruct/test_ostruct.rb (test_frozen): added assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ test/ostruct/test_ostruct.rb | 8 +++++++- version.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a02a7c432..c80512d3ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 25 17:39:28 2009 Nobuyoshi Nakada + + * test/ostruct/test_ostruct.rb (test_frozen): added assertions. + Wed Nov 25 16:43:24 2009 NAKAMURA, Hiroshi * lib/monitor.rb (MonitorMixin.mon_release): ensure the scheduled diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb index 4d56102462..5c140a46ee 100644 --- a/test/ostruct/test_ostruct.rb +++ b/test/ostruct/test_ostruct.rb @@ -41,7 +41,11 @@ EOT assert_equal("#", foo.inspect) foo.bar = 1 foo.baz = 2 - assert_equal("#", foo.inspect) + foo.foo = 0 + assert_match(/\A#))?)+>\z/, foo.inspect) + assert_match(/ foo=0(?:, |>\z)/, foo.inspect) + assert_match(/ bar=1(?:, |>\z)/, foo.inspect) + assert_match(/ baz=2(?:, |>\z)/, foo.inspect) foo = OpenStruct.new foo.bar = OpenStruct.new @@ -56,5 +60,7 @@ EOT o.freeze assert_raise(TypeError) {o.b = 'b'} assert_not_respond_to(o, :b) + assert_raise(TypeError) {o.a = 'z'} + assert_equal('a', o.a) end end diff --git a/version.h b/version.h index a20732c938..b083535fe7 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-11-25" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20091125 -#define RUBY_PATCHLEVEL 223 +#define RUBY_PATCHLEVEL 224 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 -- cgit v1.2.3