Feature #8601

Win32API.rb long life plan

Added by Akio Tajima 10 months ago. Updated 3 months ago.

[ruby-core:55797]
Status:Assigned
Priority:Normal
Assignee:Usaku NAKAMURA
Category:lib
Target version:current: 2.2.0

Description

Win32API.rb sits on ext/dl/win32/lib in the source tree.
But DL is deprecated on Ruby 2.0.1, so I'd like to move it from ext/dl/win32/lib to ext/win32/lib because the library is fundamental for Win32 platform.
Also it's required to fit Fiddler.

Attachment is the patched version of Win32API.rb for both DL and Fiddle based on mirich (http://d.hatena.ne.jp/mirichi/20130629/p1).

Win32API.rb Magnifier (1.53 KB) Akio Tajima, 07/05/2013 03:29 AM

History

#1 Updated by Vit Ondruch 10 months ago

Wouldn't it be better to move it out of StdLib into separate gem?

#2 Updated by Akio Tajima 10 months ago

No. Many of Windows users use ruby on enterprise environment that is disconnected from the network. So pre-installed library is required especially fundamentals such as Win32API.

#3 Updated by Nobuyoshi Nakada 10 months ago

And lib/rubygems/user_interaction.rb and lib/securerandom.rb depend on it.

#4 Updated by Nobuyoshi Nakada 10 months ago

lib/rubygems/user_interaction.rb has code to use io/console already.

Bad habit branching by the version string...

#5 Updated by Luis Lavena 10 months ago

  • Category set to lib
  • Status changed from Open to Assigned
  • Assignee set to Usaku NAKAMURA
  • Target version set to 2.1.0

Hello Arton,

In rb-readline project we used DL be able to access Windows API due the warning/removal of Win32API.rb after 2.0

Park Heesob wrote some wrapper on top of DL, and a few days ago we received a pull request that uses Fiddle:

https://github.com/luislavena/rb-readline/pull/90

I would love get this sorted out in Ruby itself so we don't have to fake it.

Assigning to Usa for final decision.

Thank you.

#6 Updated by Usaku NAKAMURA 9 months ago

Win32API.rb should be removed at 2.1.0.

#7 Updated by Luis Lavena 9 months ago

usa (Usaku NAKAMURA) wrote:

Win32API.rb should be removed at 2.1.0.

Hello usa,

This doesn't go against what nobu and arton said?

I can modify both RubyGems and SecureRandom to use Fiddle (for newer versions) but not sure about the enterprise environments that have no access to gems.

Thank you.

#8 Updated by Hiroshi SHIBATA 3 months ago

  • Target version changed from 2.1.0 to current: 2.2.0

Also available in: Atom PDF