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

Warning: loading in progress, circular require considered harmful #66

Closed
floehopper opened this issue Feb 11, 2012 · 4 comments
Closed
Assignees

Comments

@floehopper
Copy link
Member

On behalf of @kennyj :-

I'm a rails contributor.

When I executed rake test_postgresql in rails/active_record. I found
a warning in mocha.
I'm using ruby-1.9.3-p0.

/home/kennyj/.rvm/gems/ruby-1.9.3-p0/gems/mocha-0.10.4/lib/mocha/mock.rb:9: warning: loading in progress, circular require considered harmful - /home/kennyj/.rvm/gems/ruby-1.9.3-p0/gems/mocha-0.10.4/lib/mocha/mockery.rb

In mocha/mockery.rb
...
require 'mocha/mock' # the cause of problem ???
...

@ghost ghost assigned floehopper Feb 11, 2012
@floehopper
Copy link
Member Author

I suspect this was broken by 511fbf8 which in turn was a fix for issue #63. I'll attempt an alternative fix. Thanks for reporting the problem.

@floehopper
Copy link
Member Author

Attempted fix in a8e27d8. @kennyj - is there any chance you can see whether this fixes your problem? Thanks, James.

@kennyj
Copy link

kennyj commented Feb 11, 2012

@floehopper Thanks ! It's work fine.

BTW,
when I wanted to report this issue, I went to http://rubygems.org/gems/mocha and http://mocha.rubyforge.org/ .
but I couldn't find repos and issues location ;-)

@floehopper
Copy link
Member Author

Cool. Thanks for the feedback. I've updated the README (which also appears at http://mocha.rubyforge.org) and the gem page (at http://rubygems.org/gems/mocha) to have the relevant links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants