Embedding several ruby interpreter instances in C?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello list,

the subject says it all: I know how to generally embed Ruby into a C
program. However, since ruby_init() & co just return void, I guess there
is
no way to have more than one Ruby interpreter embedded into the same
program
at a given time. Am I correct with this assumption?

TIA!

  Eric

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEUEARECAAYFAkyHnuMACgkQhS0drJ3goJJ/cgCVGzuL/A4Gl5kNLQW7/fJMdfL0
CQCfStrIS2GnJftLMb4ZYcB/PgmhtUM=
=MQbR
-----END PGP SIGNATURE-----

Hi,

In message “Re: Embedding several ruby interpreter instances in C?”
on Wed, 8 Sep 2010 23:35:37 +0900, Eric MSP Veith
[email protected] writes:

|the subject says it all: I know how to generally embed Ruby into a C
|program. However, since ruby_init() & co just return void, I guess there is
|no way to have more than one Ruby interpreter embedded into the same program
|at a given time. Am I correct with this assumption?
|
|TIA!

Yes. We haven’t removed all global variables yet.

          matz.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Wednesday 08 September 2010, Yukihiro M. [email protected]
wrote:

Yes. We haven’t removed all global variables yet.

Thank you! I just needed the confirmation. :slight_smile:

  Eric

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkyHp6EACgkQhS0drJ3goJJnAwCfTcRC1p/dgBDQ5FQfvUT3JtDf
rSgAn3Zb4eYiOxAusW9JFvgckqXemPN4
=8YVr
-----END PGP SIGNATURE-----

On Sep 8, 2010, at 07:59 , Yukihiro M. wrote:

|TIA!

Yes. We haven’t removed all global variables yet.

Didn’t Evan P. do this and provide a patch to ruby-core back in the
day (pre-sydney)?

Eric MSP Veith wrote:

the subject says it all: I know how to generally embed Ruby into a C
program. However, since ruby_init() & co just return void, I guess there is
no way to have more than one Ruby interpreter embedded into the same program
at a given time. Am I correct with this assumption?

This is a specific goal of Rubinius, and I know that it did work
with the old stackless Shotgun VM. I’m not sure about the current VM,
but if it doesn’t work, it’s probably a bug that will be fixed.

jwm

On Wed, Sep 8, 2010 at 3:05 PM, Ryan D. [email protected]
wrote:

Didn’t Evan P. do this and provide a patch to ruby-core back in the
day (pre-sydney)?

Via my magical copypasta IRC to ruby-talk gateway, Evan says:

“yes, my patch removed all global variables (it was in syndey). no, it’s
not applicable to 1.9.”