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: already initialized constants #1

Open
spinlock99 opened this issue Jun 8, 2011 · 1 comment
Open

warning: already initialized constants #1

spinlock99 opened this issue Jun 8, 2011 · 1 comment

Comments

@spinlock99
Copy link

Hi there. First, thanks for the updated repo for tlsmail. I was thinking of setting up a git repo to fix the warnings myself :) But, I'm not totally convinced that the best solution to the warning bug is to turn down the reporting level. I like the idea of testing to see if a constant is defined and removing it before setting the constant (see code below). This way, the situation that caused the warning is fixed rather than the warning just being turned down. Let me know if you're interested in this fix and I'll be happy to fork the repo and push a fix.

Net.instance_eval {remove_const :SMTPSession} if defined?(SMTPSession)
SMTPSession = SMTP
@jackocnr
Copy link

Haha 2 years ago. I can confirm that this solution works. And for some reason we're still using this gem.

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

2 participants