Method: Fiddle.win32_last_error

Defined in:
lib/fiddle.rb

.win32_last_errorObject

Returns the last win32 Error of the current executing Thread or nil if none



16
17
18
19
20
21
22
23
# File 'lib/fiddle.rb', line 16

def self.win32_last_error
  if RUBY_ENGINE == 'jruby'
    errno = FFI.errno
    errno == 0 ? nil : errno
  else
    Thread.current[:__FIDDLE_WIN32_LAST_ERROR__]
  end
end