[MacRuby-devel] NSInvocationOperation usage Segmentation fault

Sven A. Schmidt sas at abstracture.de
Tue Oct 11 07:53:48 PDT 2011


Hm, I'm not a ruby export but puts is used in the Thread examples at ruby-doc.

But I just read in the docs for initWithTarget:selector:object:

"The return type of the method may be void, a scalar value, or an object that can be returned as an id type."

I've tried returning strings and a dict and that worked but int/float/bool didn't, so it looks like object return values are supported but scalars aren't. nil also doesn't work -- but isn't that what "puts" would return? I understand ruby always returns the result of the last command from a scope.

-sas

On Oct 11, 2011, at 16:31, CMcP wrote:

> Is puts thread safe?  I tried having bar return a string rather than print it and having the main code print operation.result after the runloop finished executing.  That worked OK with no crash.
> -- CMcP
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

--

Dr. Sven A. Schmidt
abstracture GmbH & Co. KG
Wilhelm-Theodor-Römheld-Straße 28
55130 Mainz

Fon      +49 6131 696 29 0
Fax      +49 6131 696 29 29
Mail     sas at abstracture.de

Amtsgericht Mainz HRA 40625
USt-IdNr.: DE258454694

Persönlich haftender Gesellschafter:
abstracture IT-Beratungs- und Beteiligungsgesellschaft mbH, Sitz Mainz, Amtsgericht Mainz HRB 41357

Geschäftsführer: Dr. U. Koch, T. Meyer, A. Misok, Dr. S.A. Schmidt, Dr. V. Schönharting

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3770 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20111011/96fc0fe4/attachment.bin>


More information about the MacRuby-devel mailing list