* encoding.c (enc_compatible_p): raise TypeError when argument is Encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e8e8472058
commit
33dd0c35f1
@ -1,3 +1,7 @@
|
|||||||
|
Sun Aug 24 04:23:19 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* encoding.c (enc_compatible_p): raise TypeError when argument is Encoding.
|
||||||
|
|
||||||
Sat Aug 23 23:25:47 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
Sat Aug 23 23:25:47 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* lib/cgi.rb (CGI#out): remove auto encoding conversion and set
|
* lib/cgi.rb (CGI#out): remove auto encoding conversion and set
|
||||||
|
@ -876,6 +876,8 @@ enc_compatible_p(VALUE klass, VALUE str1, VALUE str2)
|
|||||||
{
|
{
|
||||||
rb_encoding *enc;
|
rb_encoding *enc;
|
||||||
|
|
||||||
|
if (enc_check_encoding(str1) > 0 || enc_check_encoding(str2) > 0)
|
||||||
|
rb_raise(rb_eTypeError, "wrong argument type Encoding (expected String)");
|
||||||
if (!enc_capable(str1)) return Qnil;
|
if (!enc_capable(str1)) return Qnil;
|
||||||
if (!enc_capable(str2)) return Qnil;
|
if (!enc_capable(str2)) return Qnil;
|
||||||
enc = rb_enc_compatible(str1, str2);
|
enc = rb_enc_compatible(str1, str2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user