vm_insnhelper.c: preserve encoding

* vm_insnhelper.c (vm_getivar): preserve variable name encoding in
  warning message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-10-20 05:20:39 +00:00
parent 6948188f38
commit bd2d094aab
2 changed files with 6 additions and 1 deletions

View file

@ -1826,6 +1826,11 @@ class TestModule < Test::Unit::TestCase
assert_warning '' do
assert_equal(42, a.ivar)
end
name = "@\u{5909 6570}"
assert_warning(/instance variable #{name} not initialized/) do
assert_nil(a.instance_eval(name))
end
end
def test_uninitialized_attr