aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--struct.c2
-rw-r--r--test/-ext-/struct/test_member.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 75f9add471..9d89134392 100644
--- a/struct.c
+++ b/struct.c
@@ -84,7 +84,7 @@ NORETURN(static void not_a_member(ID id));
static void
not_a_member(ID id)
{
- rb_name_error(id, "`%s' is not a struct member", rb_id2name(id));
+ rb_name_error(id, "`%"PRIsVALUE"' is not a struct member", QUOTE_ID(id));
}
VALUE
diff --git a/test/-ext-/struct/test_member.rb b/test/-ext-/struct/test_member.rb
index 002941c95d..89767bfeb4 100644
--- a/test/-ext-/struct/test_member.rb
+++ b/test/-ext-/struct/test_member.rb
@@ -8,5 +8,6 @@ class Bug::Struct::Test_Member < Test::Unit::TestCase
s = S.new(1)
assert_equal(1, s.get(:a))
assert_raise_with_message(NameError, /is not a struct member/) {s.get(:b)}
+ assert_raise_with_message(NameError, /\u{3042}/) {s.get(:"\u{3042}")}
end
end