Method: Fiddle.last_error=

Defined in:
lib/fiddle.rb

.last_error=(error) ⇒ Object

Sets the last Error of the current executing Thread to error



67
68
69
70
71
72
73
74
# File 'lib/fiddle.rb', line 67

def self.last_error= error
  if RUBY_ENGINE == 'jruby'
    FFI.errno = error || 0
  else
    Thread.current[:__DL2_LAST_ERROR__] = error
    Thread.current[:__FIDDLE_LAST_ERROR__] = error
  end
end