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

Already on GitHub? Sign in to your account

Use local var from rescue rather than "English" global. #99

Merged
merged 1 commit into from Mar 1, 2014

Conversation

Projects
None yet
3 participants
Owner

danielsdeleo commented Mar 1, 2014

Apparently an Omnibus dependency was requiring "English"
http://www.ruby-doc.org/stdlib-2.0/libdoc/English/rdoc/English.html but
no longer does. That library must be loaded to use $ERROR_INFO. But
since $ERROR_INFO is just $!, the last exception raised, and we already
have a reference to it from rescue => e, we can just use the local
variable instead.

ping @schisamo @sethvargo

@danielsdeleo danielsdeleo Use local var from rescue rather than "English" global.
Apparently an Omnibus dependency was requiring "English"
http://www.ruby-doc.org/stdlib-2.0/libdoc/English/rdoc/English.html but
no longer does. That library must be loaded to use $ERROR_INFO. But
since $ERROR_INFO is just $!, the last exception raised, and we already
have a reference to it from `rescue => e`, we can just use the local
variable instead.
ab5dd37

@sethvargo sethvargo merged commit ab5dd37 into master Mar 1, 2014

1 check passed

default The Travis CI build passed
Details

@sethvargo sethvargo deleted the prefer-local-to-global-in-rescue branch Mar 1, 2014

Contributor

smith commented Mar 2, 2014

Omnibus aint no package I ever heard of. They require English in omnibus?

Omnibus?

English, m***_erf**_er, do you require it?!

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