diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/objspace/test_objspace.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index b54a438132..3f08413378 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -902,6 +902,12 @@ class TestObjSpace < Test::Unit::TestCase # load_allocation_path_helper 'iseq = RubyVM::InstructionSequence.load_from_binary(File.binread(path))', to_binary: true end + def test_escape_class_name + class_name = '" little boby table [Bug #20892]' + json = ObjectSpace.dump(Class.new.tap { |c| c.set_temporary_name(class_name) }) + assert_equal class_name, JSON.parse(json)["name"] + end + def test_utf8_method_names name = "utf8_❨╯°□°❩╯︵┻━┻" obj = ObjectSpace.trace_object_allocations do |
