mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/iconv/iconv.c (iconv_create): Iconv::Failure requires 3
arguments. (pointed out by NaHi) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9d02461a6e
commit
b2b2a32851
2 changed files with 19 additions and 11 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Mar 28 08:39:49 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/iconv/iconv.c (iconv_create): Iconv::Failure requires 3
|
||||||
|
arguments. (pointed out by NaHi)
|
||||||
|
|
||||||
Sun Mar 27 00:56:58 2005 Minero Aoki <aamine@loveruby.net>
|
Sun Mar 27 00:56:58 2005 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
* lib/fileutils.rb (remove_file): ignore Errno::E* if force option
|
* lib/fileutils.rb (remove_file): ignore Errno::E* if force option
|
||||||
|
@ -6,7 +11,7 @@ Sun Mar 27 00:56:58 2005 Minero Aoki <aamine@loveruby.net>
|
||||||
Sat Mar 26 22:51:33 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
Sat Mar 26 22:51:33 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tk/lib/tk.rb (_callback_entry_class?): add for checking whether
|
* ext/tk/lib/tk.rb (_callback_entry_class?): add for checking whether
|
||||||
a class is available for a callback entry.
|
a class is available for a callback entry.
|
||||||
|
|
||||||
* ext/tk/lib/tk.rb (after_cancel): add Tk.after_cancel(afterID) method.
|
* ext/tk/lib/tk.rb (after_cancel): add Tk.after_cancel(afterID) method.
|
||||||
|
|
||||||
|
@ -14,7 +19,7 @@ Sat Mar 26 22:51:33 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
of TkComm to public module method.
|
of TkComm to public module method.
|
||||||
|
|
||||||
* ext/tk/lib/tk.rb (cget): add check that slot argument is not
|
* ext/tk/lib/tk.rb (cget): add check that slot argument is not
|
||||||
empty string.
|
empty string.
|
||||||
|
|
||||||
* ext/tk/lib/tk.rb (configinfo): ditto.
|
* ext/tk/lib/tk.rb (configinfo): ditto.
|
||||||
|
|
||||||
|
@ -24,16 +29,16 @@ Sat Mar 26 22:51:33 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
* ext/tk/lib/tk/itemconfig.rb (itemconfiginfo): ditto.
|
* ext/tk/lib/tk/itemconfig.rb (itemconfiginfo): ditto.
|
||||||
|
|
||||||
* ext/tk/lib/tk/entry.rb: add TkEntry#icursor and icursor= (alias of
|
* ext/tk/lib/tk/entry.rb: add TkEntry#icursor and icursor= (alias of
|
||||||
cursor and cursor= method).
|
cursor and cursor= method).
|
||||||
|
|
||||||
* ext/tk/lib/tk/font.rb: improve font treatment when the font name is
|
* ext/tk/lib/tk/font.rb: improve font treatment when the font name is
|
||||||
empty string.
|
empty string.
|
||||||
|
|
||||||
* ext/tk/lib/tk/variable.rb: add :variable, :window and :procedure
|
* ext/tk/lib/tk/variable.rb: add :variable, :window and :procedure
|
||||||
type.
|
type.
|
||||||
|
|
||||||
* ext/tk/lib/tk/variable.rb: improve treatment of array-type
|
* ext/tk/lib/tk/variable.rb: improve treatment of array-type
|
||||||
tkvariable.
|
tkvariable.
|
||||||
|
|
||||||
* ext/tk/lib/tkextlib/blt.rb: add commands for zooming.
|
* ext/tk/lib/tkextlib/blt.rb: add commands for zooming.
|
||||||
|
|
||||||
|
|
|
@ -169,14 +169,17 @@ iconv_create
|
||||||
}
|
}
|
||||||
if (cd == (iconv_t)-1) {
|
if (cd == (iconv_t)-1) {
|
||||||
int inval = errno == EINVAL;
|
int inval = errno == EINVAL;
|
||||||
volatile VALUE msg = rb_str_new2("iconv(\"" + (inval ? 5 : 0));
|
char *s = inval ? "invalid encoding " : "iconv";
|
||||||
char *s;
|
volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)->len +
|
||||||
|
RSTRING(from)->len + 8);
|
||||||
|
|
||||||
rb_str_buf_cat2(rb_str_buf_append(msg, to), "\", \"");
|
sprintf(RSTRING(msg)->ptr, "%s(\"%s\", \"%s\")",
|
||||||
rb_str_buf_cat2(rb_str_buf_append(msg, from), "\")");
|
s, RSTRING(to)->ptr, RSTRING(from)->ptr);
|
||||||
s = StringValuePtr(msg);
|
s = RSTRING(msg)->ptr;
|
||||||
|
RSTRING(msg)->len = strlen(s);
|
||||||
if (!inval) rb_sys_fail(s);
|
if (!inval) rb_sys_fail(s);
|
||||||
rb_raise(rb_eIconvInvalidEncoding, "invalid encoding %s", s);
|
iconv_fail(rb_eIconvInvalidEncoding,
|
||||||
|
Qnil, rb_ary_new3(2, to, from), NULL, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue