diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-11 08:34:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-11 08:34:55 +0000 |
commit | 64be4cfb5ef7c36bf3dc72a04e98c61aea364713 (patch) | |
tree | 766a1068e3c18a243fd81241b274c892b3d4da30 /test | |
parent | 83ac2dfe0fdd33edcc4db40ebb75a81f342ce19e (diff) |
iseq.c: child iseq encoding
* iseq.c (iseq_inspect): preserve the encoding of child iseqs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_iseq.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 92340bd8fd..6e81c63915 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -91,6 +91,11 @@ class TestISeq < Test::Unit::TestCase asm = compile(src).disasm assert_equal(src.encoding, asm.encoding) assert_predicate(asm, :valid_encoding?) + + obj = Object.new + name = "\u{2603 26a1}" + obj.instance_eval("def #{name}; tap {}; end") + assert_include(RubyVM::InstructionSequence.of(obj.method(name)).disasm, name) end LINE_BEFORE_METHOD = __LINE__ |