aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-11 08:34:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-11 08:34:55 +0000
commit90699f86ab19aea9824ec681d63cdb09bb2024fe (patch)
tree766a1068e3c18a243fd81241b274c892b3d4da30 /test
parent0d8d04cbc7d277ad0fede628d0886e2ebc94b92c (diff)
downloadruby-90699f86ab19aea9824ec681d63cdb09bb2024fe.tar.gz
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.rb5
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__