summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-25 08:41:36 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-25 08:41:36 +0000
commit45c322bfdb3f6d38a006aef9ce3e4654db9bc8ed (patch)
tree8d5cd2782c02e62d371e437e3d9c083902de1ee3
parentc3d27c35fef49e70603fdf532fee51d1cd75f650 (diff)
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
-rw-r--r--ChangeLog4
-rw-r--r--test/ostruct/test_ostruct.rb8
-rw-r--r--version.h2
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 <nobu@ruby-lang.org>
+
+ * test/ostruct/test_ostruct.rb (test_frozen): added assertions.
+
Wed Nov 25 16:43:24 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* 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("#<OpenStruct>", foo.inspect)
foo.bar = 1
foo.baz = 2
- assert_equal("#<OpenStruct bar=1, baz=2>", foo.inspect)
+ foo.foo = 0
+ assert_match(/\A#<OpenStruct (?:(?:foo=0|bar=1|baz=2)(?:, (?!>))?)+>\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