* error.c (builtin_type_name): don't return pointer to the buffer of
temporary String object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
73768d54d3
commit
d95ce7fc03
@ -1,3 +1,8 @@
|
|||||||
|
Thu Dec 15 23:16:13 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||||
|
|
||||||
|
* error.c (builtin_type_name): don't return pointer to the buffer of
|
||||||
|
temporary String object.
|
||||||
|
|
||||||
Thu Dec 15 17:56:58 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Dec 15 17:56:58 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (argf_type): make typed data.
|
* io.c (argf_type): make typed data.
|
||||||
|
8
error.c
8
error.c
@ -392,9 +392,11 @@ builtin_type_name(VALUE x)
|
|||||||
else if (SYMBOL_P(x)) {
|
else if (SYMBOL_P(x)) {
|
||||||
etype = "Symbol";
|
etype = "Symbol";
|
||||||
}
|
}
|
||||||
else if (rb_special_const_p(x)) {
|
else if (RB_TYPE_P(x, T_TRUE)) {
|
||||||
x = rb_obj_as_string(x);
|
etype = "true";
|
||||||
etype = StringValuePtr(x);
|
}
|
||||||
|
else if (RB_TYPE_P(x, T_FALSE)) {
|
||||||
|
etype = "false";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
etype = rb_obj_classname(x);
|
etype = rb_obj_classname(x);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user