Thanks due to your hints, the little test is now working. I changed my error generating method so, that it returns the NSError as it would be done by the brigde by converting the pointer to an additional retrun value:

require 'osx/cocoa'

class Contr < OSX::NSObject
  include OSX


  ib_action :trigger


  def generateError
    # simulate an error generating NS method
    error = NSError.alloc.initWithDomain_code_userInfo(
                  4711, nil)
    # return NO and the constructed NSError
    return 0, error
  end # generate_error


  def trigger(sender)
    #errorPtr = ObjcPtr.new(1000)
    myresult = Array.new 
    myresult = generateError
    successful = myresult[0]
    error = myresult[1]
    unless successful == 1
      a = NSAlert.alertWithError(error)
    end # unless
  end # trigger

  Many thanks to your appreciated help and best regards