Actions
Bug #10876
closedWin32API.new fails when an Array is given for the import argument
Description
In Ruby 2.2.0, the Win32API.new method fails when an Array is given for the import argument. In all previous versions, it can be either an Array or a String.
The mistake occurred when Aaron Patterson converted to Fiddle and expected the argument would be an Array ("import.map"), then later Nakamura-san switched to expect a String ("import.chars.map") however both of these are incorrect. The code a few lines above does this: [import].join... so it explicitly allows Array or String.
Links to code history and a patch are offered at https://github.com/ruby/ruby/pull/835
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r49750.
- ext/win32/Win32API.rb (initialize): accept both a string and an array
for the arguments of the imported function.
reported by Aaron Stone [ruby-core:68208] [Bug #10876] [Fixes GH-835]
Updated by aaron@serendipity.cx (Aaron Stone) over 9 years ago
Thank you for the fix! This must still be backported to ruby_2_2 branch!
Updated by hsbt (Hiroshi SHIBATA) over 9 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED
Updated by naruse (Yui NARUSE) over 9 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE
ruby_2_2 r49761 merged revision(s) 49750.
Actions
Like0
Like0Like0Like0Like0