summaryrefslogtreecommitdiff
path: root/ext/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-29 11:01:55 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-29 11:01:55 +0000
commit8dcd42552feefe6b990763db0d9c24836a66da6f (patch)
treeae0c716870a5d30d3110062740b9f40f1fc247fb /ext/win32ole
parent4e60b843c6e6349cc6c2b50a1fae2ca4ad05fe75 (diff)
* 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
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/win32ole.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 7cffda2..3d53e17 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);