Sha256: 4b47c8f097a48b80a0b797975f58e73fa01fe9a5725c93e4effb6faab7778c8e

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

require 'rbconfig'
begin
  case RbConfig::CONFIG['MAJOR']
  when '2'
    if RbConfig::CONFIG['MINOR'] == '0'
      if RbConfig::CONFIG['arch'] =~ /x64/i
        require File.join(File.dirname(__FILE__), 'ruby2_64/win32/api')
      else
        require File.join(File.dirname(__FILE__), 'ruby2_32/win32/api')
      end
    end

    if RbConfig::CONFIG['MINOR'] == '1'
      if RbConfig::CONFIG['arch'] =~ /x64/i
        require File.join(File.dirname(__FILE__), 'ruby21_64/win32/api')
      else
        require File.join(File.dirname(__FILE__), 'ruby21_32/win32/api')
      end
    end

    if RbConfig::CONFIG['MINOR'] == '2'
      if RbConfig::CONFIG['arch'] =~ /x64/i
        require File.join(File.dirname(__FILE__), 'ruby22_64/win32/api')
      else
        require File.join(File.dirname(__FILE__), 'ruby22_32/win32/api')
      end
    end

    if RbConfig::CONFIG['MINOR'] == '3'
      if RbConfig::CONFIG['arch'] =~ /x64/i
        require File.join(File.dirname(__FILE__), 'ruby23_64/win32/api')
      else
        require File.join(File.dirname(__FILE__), 'ruby23_32/win32/api')
      end
    end

  end
rescue LoadError
  require File.join(File.dirname(__FILE__), '../../ext/api')
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
windows-pr-1.2.5 vendor/bundle/ruby/2.2.0/gems/win32-api-1.6.0-universal-mingw32/lib/win32/api.rb
win32-api-1.6.0-universal-mingw32 lib/win32/api.rb