From 8dcd42552feefe6b990763db0d9c24836a66da6f Mon Sep 17 00:00:00 2001 From: suke Date: Mon, 29 Sep 2008 11:01:55 +0000 Subject: [PATCH] * ext/win32ole/win32ole.c (rescue_callback): use rb_write_error instead of fprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/win32ole/win32ole.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17547f198f..a8d357121a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 29 19:59:00 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (rescue_callback): use rb_write_error + instead of fprintf. + Mon Sep 29 01:51:54 2008 Yusuke Endoh * test/rdoc/test_rdoc_info_formatting.rb (teardown): delete tmpdir for diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 7cffda2aed..3d53e17a60 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -118,7 +118,7 @@ #define WC2VSTR(x) ole_wc2vstr((x), TRUE) -#define WIN32OLE_VERSION "1.3.1" +#define WIN32OLE_VERSION "1.3.2" typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX) (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*); @@ -7542,11 +7542,13 @@ static VALUE rescue_callback(VALUE arg) { + VALUE error; VALUE e = rb_errinfo(); VALUE bt = rb_funcall(e, rb_intern("backtrace"), 0); VALUE msg = rb_funcall(e, rb_intern("message"), 0); bt = rb_ary_entry(bt, 0); - fprintf(stdout, "%s: %s (%s)\n", StringValuePtr(bt), StringValuePtr(msg), rb_obj_classname(e)); + error = rb_sprintf("%s: %s (%s)\n", StringValuePtr(bt), StringValuePtr(msg), rb_obj_classname(e)); + rb_write_error(StringValuePtr(error)); rb_backtrace(); ruby_finalize(); exit(-1);