patch#7539.txt

Martin Dürst, 12/11/2012 01:49 PM

Download (583 Bytes)

 
1
Index: object.c
2
===================================================================
3
--- object.c	(リビジョン 38307)
4
+++ object.c	(作業コピー)
5
@@ -2294,12 +2294,13 @@
6
     r = rb_check_funcall(val, m, 0, 0);
7
     if (r == Qundef) {
8
 	if (raise) {
9
-	    rb_raise(rb_eTypeError, "can't convert %s into %s",
10
+	    rb_raise(rb_eTypeError, "can't convert %s into %s (using %s)",
11
 		     NIL_P(val) ? "nil" :
12
 		     val == Qtrue ? "true" :
13
 		     val == Qfalse ? "false" :
14
 		     rb_obj_classname(val),
15
-		     tname);
16
+		     tname,
17
+		     method);
18
 	}
19
 	return Qnil;
20
     }