diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 11:06:49 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 11:06:49 +0000 |
commit | d0e61300311c03c849be3566fd799af383ab6bfd (patch) | |
tree | fb9e5b10c9e9af6259f46f22de7de5a2d54e76a1 | |
parent | 23f0e341af6bca062b95fa9bc69b2fa59f903e05 (diff) | |
download | ruby-d0e61300311c03c849be3566fd799af383ab6bfd.tar.gz |
add a test for non-ascii method name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_m17n.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 0b7600b47b..de66ab3516 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1858,4 +1858,19 @@ class TestM17N < Test::Unit::TestCase def test_regexp_match assert_equal([0,0], //.match("\xa1\xa1".force_encoding("euc-jp"),-1).offset(0)) end + + def test_nonascii_method_name + eval(e("def \xc2\xa1() @nonascii_method_name = :e end")) + eval(u("def \xc2\xa1() @nonascii_method_name = :u end")) + eval(e("\xc2\xa1()")) + assert_equal(:e, @nonascii_method_name) + eval(u("\xc2\xa1()")) + assert_equal(:u, @nonascii_method_name) + me = method(e("\xc2\xa1")) + mu = method(u("\xc2\xa1")) + assert_not_equal(me.name, mu.name) + assert_not_equal(me.inspect, mu.inspect) + assert_equal(e("\xc2\xa1"), me.name) + assert_equal(u("\xc2\xa1"), mu.name) + end end |