diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-08 10:53:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-08 10:53:43 +0000 |
commit | e9dc6f6076207f84a93ae917ca682d7d2c973f86 (patch) | |
tree | a660daed9cba2b63b4c4b158eb2112d227a33514 /test | |
parent | 497075b3a1b2021f882f13b86b1e96dc87513d6f (diff) | |
download | ruby-e9dc6f6076207f84a93ae917ca682d7d2c973f86.tar.gz |
Check by #name [ruby-core:90853] [Bug #15497]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index bac16f2bda..d5c66be1ec 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -2061,17 +2061,13 @@ class TestModule < Test::Unit::TestCase $foo \u3042$ ].each do |name| - assert_raise_with_message(NameError, /#{Regexp.quote(quote(name))}/) do + e = assert_raise(NameError) do Module.new { attr_accessor name.to_sym } end + assert_equal(name, e.name.to_s) end end - private def quote(name) - encoding = Encoding.default_internal || Encoding.default_external - (name.encoding == encoding || name.ascii_only?) ? name : name.inspect - end - class AttrTest class << self attr_accessor :cattr |