diff options
| -rw-r--r-- | ext/objspace/objspace_dump.c | 2 | ||||
| -rw-r--r-- | test/objspace/test_objspace.rb | 15 | ||||
| -rw-r--r-- | version.h | 2 |
3 files changed, 17 insertions, 2 deletions
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c index cf7acb5c6f..47081754c9 100644 --- a/ext/objspace/objspace_dump.c +++ b/ext/objspace/objspace_dump.c @@ -141,7 +141,7 @@ dump_append_sizet(struct dump_config *dc, const size_t number) } static void -dump_append_c(struct dump_config *dc, char c) +dump_append_c(struct dump_config *dc, unsigned char c) { if (c <= 0x1f) { const unsigned int width = (sizeof(c) * CHAR_BIT / 4) + 5; diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index a1954d56a9..bdc9c8c3d7 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -632,4 +632,19 @@ class TestObjSpace < Test::Unit::TestCase assert_equal '42', out[2] end end + + def test_utf8_method_names + name = "utf8_❨╯°□°❩╯︵┻━┻" + obj = ObjectSpace.trace_object_allocations do + __send__(name) + end + dump = ObjectSpace.dump(obj) + assert_equal name, JSON.parse(dump)["method"], dump + end + + private + + def utf8_❨╯°□°❩╯︵┻━┻ + "1#{2}" + end end @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 3 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 63 +#define RUBY_PATCHLEVEL 64 #define RUBY_RELEASE_YEAR 2022 #define RUBY_RELEASE_MONTH 9 |
