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

Gem::Specification::find_by_name errors #12

Merged
merged 1 commit into from
Jul 13, 2011
Merged

Gem::Specification::find_by_name errors #12

merged 1 commit into from
Jul 13, 2011

Conversation

oruen
Copy link
Contributor

@oruen oruen commented Jul 11, 2011

Gem::Specification::find_by_name raises Gem::LoadError when it's unable to find required gem. So using this method in boolean statements requires one more rescue statement. You could easily see this issue by running gem tests on rubygems 1.8.5 without one of the optional gems installed: json, yajl-ruby or uuidtools.

Checking gem availibality certainly needs a helper, I'm just not sure where to place it.

The patch in this request fixes the Gem::LoadError exception.

hoxworth added a commit that referenced this pull request Jul 13, 2011
Gem::Specification::find_by_name errors
@hoxworth hoxworth merged commit ece042a into voxpupuli:master Jul 13, 2011
@hoxworth
Copy link
Contributor

Thanks for this; I made the mistake of not testing out the Gem loading code after auto-merging some code recently.

ottopoellath pushed a commit to ottopoellath/json-schema that referenced this pull request May 24, 2013
Gem::Specification::find_by_name errors
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

Successfully merging this pull request may close these issues.

2 participants