mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 14:34:39 +02:00
iseq.c: preserve encoding
* iseq.c (iseqw_inspect): preserve path encoding in the result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
581cd6cfad
commit
a57d295e36
2 changed files with 13 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue