From 358840fa7d510010ef1f775be567ba2268119e17 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 17 Nov 2014 18:23:09 +0000 Subject: object.c: fix error message * object.c (check_setter_id): show the original argument instead of nil on TypeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 372254e8e9..74521f8444 100644 --- a/object.c +++ b/object.c @@ -1930,8 +1930,8 @@ check_setter_id(VALUE name, int (*valid_id_p)(ID), int (*valid_name_p)(VALUE), else { VALUE str = rb_check_string_type(name); if (NIL_P(str)) { - rb_raise(rb_eTypeError, "%+"PRIsVALUE" is not a symbol or string", - str); + rb_raise(rb_eTypeError, "% "PRIsVALUE" is not a symbol or string", + name); } if (!valid_name_p(str)) { rb_name_error_str(str, message, QUOTE(str)); -- cgit v1.2.3