1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Revert "objspace_dump.c: skip dumping method name if not pure ASCII"

This reverts commit 79406e3600.
This commit is contained in:
Jean byroot Boussier 2022-07-21 19:55:02 +02:00 committed by Jean Boussier
parent 4af0dd36fc
commit f0ae583a3d
Notes: git 2022-07-22 02:56:27 +09:00
2 changed files with 2 additions and 17 deletions

View file

@ -547,10 +547,8 @@ dump_object(VALUE obj, struct dump_config *dc)
}
if (RTEST(ainfo->mid)) {
VALUE m = rb_sym2str(ainfo->mid);
if (dump_string_ascii_only(RSTRING_PTR(m), RSTRING_LEN(m))) {
dump_append(dc, ", \"method\":");
dump_append_string_value(dc, m);
}
dump_append(dc, ", \"method\":");
dump_append_string_value(dc, m);
}
dump_append(dc, ", \"generation\":");
dump_append_sizet(dc, ainfo->generation);

View file

@ -725,17 +725,4 @@ class TestObjSpace < Test::Unit::TestCase
assert_equal '42', out[2]
end
end
def test_utf8_method_names
obj = ObjectSpace.trace_object_allocations do
utf8_°°
end
assert_nil JSON.parse(ObjectSpace.dump(obj))["method"]
end
private
def utf8_°°
"1" + "2"
end
end