mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* variable.c (rb_set_class_path): do not set path if
* lib/cgi.rb (CGI::QueryExtension): give extended string, not a delegater object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8e877fc517
commit
22c005569b
11 changed files with 196 additions and 115 deletions
8
error.c
8
error.c
|
@ -396,7 +396,7 @@ exc_to_s(exc)
|
|||
{
|
||||
VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
|
||||
|
||||
if (NIL_P(mesg)) return rb_class_path(CLASS_OF(exc));
|
||||
if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
|
||||
if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
|
||||
return mesg;
|
||||
}
|
||||
|
@ -435,11 +435,11 @@ exc_inspect(exc)
|
|||
klass = CLASS_OF(exc);
|
||||
exc = rb_obj_as_string(exc);
|
||||
if (RSTRING(exc)->len == 0) {
|
||||
return rb_str_dup(rb_class_path(klass));
|
||||
return rb_str_dup(rb_class_name(klass));
|
||||
}
|
||||
|
||||
str = rb_str_buf_new2("#<");
|
||||
klass = rb_class_path(klass);
|
||||
klass = rb_class_name(klass);
|
||||
rb_str_buf_append(str, klass);
|
||||
rb_str_buf_cat(str, ": ", 2);
|
||||
rb_str_buf_append(str, exc);
|
||||
|
@ -641,7 +641,7 @@ name_err_to_s(exc)
|
|||
{
|
||||
VALUE mesg = rb_attr_get(exc, rb_intern("mesg")), str = mesg;
|
||||
|
||||
if (NIL_P(mesg)) return rb_class_path(CLASS_OF(exc));
|
||||
if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
|
||||
StringValue(str);
|
||||
if (str != mesg) {
|
||||
rb_iv_set(exc, "mesg", mesg = str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue