aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-09 09:03:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-09 09:03:07 +0000
commite70f74c3d287e2f8cb3aed80ffaaad0902a3af2c (patch)
treec93ae2a9643b2b3c5ca96c748b425414e6a334b9 /test
parentef46e8d2645cb8987c558102430cc5a642f6232b (diff)
downloadruby-e70f74c3d287e2f8cb3aed80ffaaad0902a3af2c.tar.gz
vm_method.c: preserve encoding
* vm_method.c (rb_attr): preserve encoding of the attribute ID in error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_module.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 9ad2f39fa9..2847e9b5df 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -247,6 +247,7 @@ class TestModule < Test::Unit::TestCase
"",
":",
["String::", "[Bug #7573]"],
+ "\u{3042}",
].each do |name, msg|
expected = "wrong constant name %s" % name
msg = "#{msg}#{': ' if msg}wrong constant name #{name.dump}"
@@ -1653,11 +1654,12 @@ class TestModule < Test::Unit::TestCase
end
def test_invalid_attr
- %w[
+ %W[
foo?
@foo
@@foo
$foo
+ \u{3042}$
].each do |name|
assert_raise_with_message(NameError, /#{Regexp.quote(name)}/) do
Module.new { attr_accessor name.to_sym }