summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_iseq.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index df71e1821e..54256816cf 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -270,4 +270,12 @@ class TestISeq < Test::Unit::TestCase
assert_equal(0, eval("0"))
end;
end
+
+ def test_inspect
+ %W[foo \u{30d1 30b9}].each do |name|
+ assert_match /@#{name}/, ISeq.compile("", name).inspect, name
+ m = ISeq.compile("class TestISeq::Inspect; def #{name}; end; instance_method(:#{name}); end").eval
+ assert_match /:#{name}@/, ISeq.of(m).inspect, name
+ end
+ end
end