T
transfire
Is there any way to ask a file what other file require/load 'd it? I
imagine this has been asked before but I couldnt seem to find good
terms to search for it.
The reason I ask is b/c I am getting the freakiest error. I'm running
my test, right. Now when I run them one at a time by hand they all
work fine. But if I run them via a script that in turn runs them one
at time for me, eg:
test_files.each do |file|
sh %{ruby -e 'puts "\n\n#{file}"; load "#{file}"' >> #{output}}
end
Then I get a very very very strange error where, test_autoarray.rb
seems to somehow cause text_infinity.rb to load even though they have
no connection whatsoever, but worse, it's not the test_infinity.rb
that is supposed to load about 70 test files later, but rather the
test file in my pkg/ staging folder! I have no idea how it picks that
up. The one thing that strikes me is that the pkg/ file it hard linked
to the real file, but I don't see how Ruby could possibly know that.
Below is a snip of the output. I added a 'p __FILE__' and a 'p caller'
to the top of test_infinity.rb to show the file it's coming from. As
you can see it's running right along fine but when it hits
test_autoarray.rb that's when it goes wack. But then it goes right
back to normal and finishes without issue.
T.
...
test/unit/hash/test_at.rb
Loaded suite -e
Started
imagine this has been asked before but I couldnt seem to find good
terms to search for it.
The reason I ask is b/c I am getting the freakiest error. I'm running
my test, right. Now when I run them one at a time by hand they all
work fine. But if I run them via a script that in turn runs them one
at time for me, eg:
test_files.each do |file|
sh %{ruby -e 'puts "\n\n#{file}"; load "#{file}"' >> #{output}}
end
Then I get a very very very strange error where, test_autoarray.rb
seems to somehow cause text_infinity.rb to load even though they have
no connection whatsoever, but worse, it's not the test_infinity.rb
that is supposed to load about 70 test files later, but rather the
test file in my pkg/ staging folder! I have no idea how it picks that
up. The one thing that strikes me is that the pkg/ file it hard linked
to the real file, but I don't see how Ruby could possibly know that.
Below is a snip of the output. I added a 'p __FILE__' and a 'p caller'
to the top of test_infinity.rb to show the file it's coming from. As
you can see it's running right along fine but when it hits
test_autoarray.rb that's when it goes wack. But then it goes right
back to normal and finishes without issue.
T.
...
test/unit/hash/test_at.rb
Loaded suite -e
Started