2014-10-17 21:51:36 +00:00
|
|
|
require 'ffi'
|
|
|
|
|
2015-11-15 23:13:43 +00:00
|
|
|
# @api private
|
2014-10-17 21:51:36 +00:00
|
|
|
module RbBug
|
|
|
|
extend FFI::Library
|
|
|
|
ffi_lib 'ruby'
|
2015-05-31 20:44:09 +00:00
|
|
|
attach_function :rb_bug, %i[string varargs], :void
|
2014-10-17 21:51:36 +00:00
|
|
|
|
|
|
|
# Call the test bug
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
def self.call
|
|
|
|
rb_bug('%s', :string, 'test bug')
|
|
|
|
end
|
|
|
|
|
|
|
|
end # RbBug
|