mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* object.c (rb_inspect): fix typo and error message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
42b8654bf0
commit
30f813ddf2
1 changed files with 2 additions and 2 deletions
4
object.c
4
object.c
|
@ -428,7 +428,7 @@ rb_any_to_s(VALUE obj)
|
||||||
/*
|
/*
|
||||||
* If the default external encoding is ASCII compatible, the encoding of
|
* If the default external encoding is ASCII compatible, the encoding of
|
||||||
* inspected result must be compatible with it.
|
* inspected result must be compatible with it.
|
||||||
* If the default external encoding is ASCII incomapatible,
|
* If the default external encoding is ASCII incompatible,
|
||||||
* the result must be ASCII only.
|
* the result must be ASCII only.
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
|
@ -442,7 +442,7 @@ rb_inspect(VALUE obj)
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
if (rb_enc_get(str) != ext && !rb_enc_str_asciionly_p(str))
|
if (rb_enc_get(str) != ext && !rb_enc_str_asciionly_p(str))
|
||||||
rb_raise(rb_eEncCompatError, "inspected result must be ASCII only or use the same encoding with default external");
|
rb_raise(rb_eEncCompatError, "inspected result must be ASCII only or use the default external encoding");
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue