Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutually recursive require breaks with SystemStackError #837

Open
codeZeilen opened this issue Aug 12, 2014 · 0 comments
Open

Mutually recursive require breaks with SystemStackError #837

codeZeilen opened this issue Aug 12, 2014 · 0 comments

Comments

@codeZeilen
Copy link

With two files modulea.rb and moduleb.rb the following happens:

# modulea.rb
$LOAD_PATH << Dir.pwd
require moduleb
print "a done\n"

# moduleb.rb
$LOAD_PATH << Dir.pwd
require modulea
print "b done\n"

# Using Ruby 1.9.3p194
>>a done
>>b done
>>a done

# Using topaz
/code/rpython/babelsberg-r/lib-topaz/enumerable.rb:115:in `include?': stack level too deep (SystemStackError)
from /home/patrick/Documents/code/rpython/minimalRecursiveModules/moduleb.rb:2:in `require'
from /home/patrick/Documents/code/rpython/minimalRecursiveModules/moduleb.rb:2:in `<main>'
from /home/patrick/Documents/code/rpython/minimalRecursiveModules/modulea.rb:2:in `require'
from /home/patrick/Documents/code/rpython/minimalRecursiveModules/modulea.rb:2:in `<main>'
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant