Daniel Frank <ruby-talk-2597 / danielfrank.net> writes:

> I'm pretty new to ruby and this is my first real program I'm writing.
> Currently I face an issue with the GPGME gem that I cannot figure out
> how to solve: The GPGME::decrypt method does not seem to work as I
> expect it, after reading the documentation.

First of all, what version of GnuPG are you using?  Since GPGME (C
library) uses the gpg command internally, that information would be
helpful to debug.

Try:

gpg --version

> In fact the program seems to hang somewhere during the decryption. My
> guess is that something is wrong with my passphrase callback method,
> but I cannot figure out how this needs to be done, as the examples for
> the gem does not contain a decryption example, only a signing example
> from which I have copied the passphrase callback method, but the
> method does not seem to work, as the callback method seems to be
> called with no arguments.

Could you provide actual input args to passfunc, that can be inspected
with:

def passfunc(*args)
  p args
end

Regards,
-- 
Daiki Ueno