summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-29 14:45:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-29 14:45:46 +0000
commit6496dc892dac58dc3267872c7a1f04bb7843dce3 (patch)
treef8bd0c642e26a4ee994c8d72a94bd8cb18aeeafc /test/-ext-
parent5a48805be81895a9137873a71110ea079ae3a875 (diff)
parse.y: allow junk attrset
* parse.y (rb_id_attrset, intern_str): allow junk attrset ID for Struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/symbol/test_type.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/-ext-/symbol/test_type.rb b/test/-ext-/symbol/test_type.rb
index fe79502..d681675 100644
--- a/test/-ext-/symbol/test_type.rb
+++ b/test/-ext-/symbol/test_type.rb
@@ -82,16 +82,16 @@ module Test_Symbol
assert_symtype("@foo=", :attrset?)
assert_symtype("@@foo=", :attrset?)
assert_symtype("$foo=", :attrset?)
- assert_not_symtype("0=", :attrset?)
- assert_not_symtype("@=", :attrset?)
- assert_not_symtype("@@=", :attrset?)
+ assert_symtype("0=", :attrset?)
+ assert_symtype("@=", :attrset?)
+ assert_symtype("@@=", :attrset?)
assert_not_symtype("foo", :attrset?)
assert_not_symtype("Foo", :attrset?)
assert_not_symtype("@foo", :attrset?)
assert_not_symtype("@@foo", :attrset?)
assert_not_symtype("$foo", :attrset?)
assert_not_symtype("[foo]", :attrset?)
- assert_not_symtype("[foo]=", :attrset?)
+ assert_symtype("[foo]=", :attrset?)
assert_equal(:"foo=", Bug::Symbol.attrset("foo"))
assert_symtype(Bug::Symbol.attrset("foo"), :attrset?)
assert_equal(:"Foo=", Bug::Symbol.attrset("Foo"))
@@ -102,7 +102,8 @@ module Test_Symbol
assert_symtype(Bug::Symbol.attrset("@@foo"), :attrset?)
assert_equal(:"$foo=", Bug::Symbol.attrset("$foo"))
assert_symtype(Bug::Symbol.attrset("$foo"), :attrset?)
- assert_raise(NameError) {Bug::Symbol.attrset("[foo]")}
+ assert_equal(:"[foo]=", Bug::Symbol.attrset("[foo]"))
+ assert_symtype(Bug::Symbol.attrset("[foo]"), :attrset?)
assert_equal(:[]=, Bug::Symbol.attrset(:[]))
end
end