Method: Fiddle.last_error
- Defined in:
- lib/fiddle.rb
.last_error ⇒ Object
Returns the last Error
of the current executing Thread
or nil if none
57 58 59 60 61 62 63 64 |
# File 'lib/fiddle.rb', line 57 def self.last_error if RUBY_ENGINE == 'jruby' errno = FFI.errno errno == 0 ? nil : errno else Thread.current[:__FIDDLE_LAST_ERROR__] end end |