diff options
author | suke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-29 11:01:55 +0000 |
---|---|---|
committer | suke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-29 11:01:55 +0000 |
commit | 37e1883da646e6721f3a66ed669b9953354cb6c9 (patch) | |
tree | ae0c716870a5d30d3110062740b9f40f1fc247fb /ext/win32ole/win32ole.c | |
parent | 9dff14c737a8213fbc80865b284675d3cdd6024d (diff) | |
download | ruby-37e1883da646e6721f3a66ed669b9953354cb6c9.tar.gz ruby-37e1883da646e6721f3a66ed669b9953354cb6c9.tar.xz ruby-37e1883da646e6721f3a66ed669b9953354cb6c9.zip |
* ext/win32ole/win32ole.c (rescue_callback): use rb_write_error
instead of fprintf.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/win32ole.c')
-rw-r--r-- | ext/win32ole/win32ole.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 7cffda2ae..3d53e17a6 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); |