1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge revision(s) 53322,53323: [Backport #11880]

* ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blank
	  string conversion. 
	  [Bug #11880]
	  Thanks Akio Tajima for the patch!
	  string conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2016-05-05 17:28:45 +00:00
parent ac5ffe0a19
commit 10685d4f71
3 changed files with 21 additions and 5 deletions

View file

@ -1,3 +1,10 @@
Fri May 6 02:28:31 2016 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blank
string conversion.
[Bug #11880]
Thanks Akio Tajima for the patch!
Fri May 6 02:24:13 2016 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* bignum.c: [DOC] Update result of 123456789 ** -2.

View file

@ -864,6 +864,9 @@ ole_vstr2wc(VALUE vstr)
/* do not type-conversion here to prevent from other arguments
* changing (if exist) */
Check_Type(vstr, T_STRING);
if (RSTRING_LEN(vstr) == 0) {
return NULL;
}
enc = rb_enc_get(vstr);
@ -1571,10 +1574,16 @@ ole_variant2val(VARIANT *pvar)
case VT_BSTR:
{
if(V_ISBYREF(pvar))
obj = ole_wc2vstr(*V_BSTRREF(pvar), FALSE);
else
obj = ole_wc2vstr(V_BSTR(pvar), FALSE);
if(V_ISBYREF(pvar)) {
obj = (SysStringLen(*V_BSTRREF(pvar)) == 0)
? rb_str_new2("")
: ole_wc2vstr(*V_BSTRREF(pvar), FALSE);
}
else {
obj = (SysStringLen(V_BSTR(pvar)) == 0)
? rb_str_new2("")
: ole_wc2vstr(V_BSTR(pvar), FALSE);
}
break;
}

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.3.2"
#define RUBY_RELEASE_DATE "2016-05-06"
#define RUBY_PATCHLEVEL 116
#define RUBY_PATCHLEVEL 117
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 5