[前][次][番号順一覧][スレッド一覧]

ruby-changes:33098

From: nobu <ko1@a...>
Date: Wed, 26 Feb 2014 09:43:50 +0900 (JST)
Subject: [ruby-changes:33098] nobu:r45177 (trunk): parse.y: refine error message

nobu	2014-02-26 09:43:46 +0900 (Wed, 26 Feb 2014)

  New Revision: 45177

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45177

  Log:
    parse.y: refine error message
    
    * parse.y (rb_check_id): refine error message, expected a symbol
      or a string.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 45176)
+++ parse.y	(revision 45177)
@@ -10738,7 +10738,7 @@ rb_check_id(volatile VALUE *namep) https://github.com/ruby/ruby/blob/trunk/parse.y#L10738
 	tmp = rb_check_string_type(name);
 	if (NIL_P(tmp)) {
 	    tmp = rb_inspect(name);
-	    rb_raise(rb_eTypeError, "%s is not a symbol",
+	    rb_raise(rb_eTypeError, "%s is not a symbol nor a string",
 		     RSTRING_PTR(tmp));
 	}
 	name = tmp;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]