From e8249be9fca2ebfc101f7fc3d14ee935391cd797 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 4 May 2010 09:51:27 +0000 Subject: * error.c (name_err_mesg_to_str): preserve encoding of inspection. [ruby-core:29948] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_exception.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index d7833b9d44..18ecb404be 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -304,4 +304,12 @@ end.join end assert(!e.success?) end + + def test_nomethoderror + bug3237 = '[ruby-core:29948]' + str = "\u2600" + id = :"\u2604" + e = assert_raise(NoMethodError) {str.__send__(id)} + assert_equal("undefined method `#{id}' for #{str.inspect}:String", e.message, bug3237) + end end -- cgit v1.2.3