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

fixes #246. Silence the warning about redefining this constant from the s #247

merged 1 commit into from Oct 4, 2011


None yet

benhamill commented Oct 4, 2011

fixes #246. Silence the warning about redefining this constant from the standard library.

I'm not CERTAIN this is the best solution, but it seems like if this constant was redefined on purpose (likely?), then it shouldn't be noisy.


josh commented Oct 4, 2011

I just saw this warning about 5m ago. 👍

/cc @rkh


rkh commented Oct 4, 2011

@raggi, could you double check?

tenderlove added a commit that referenced this pull request Oct 4, 2011

Merge pull request #247 from benhamill/silence_constant_warning
fixes #246. Silence the warning about redefining this constant from the s

@tenderlove tenderlove merged commit 8c638c2 into rack:master Oct 4, 2011

adamstac commented Oct 7, 2011

Thanks Aaron. :)

I'm actually getting the reverse of this. I'm using rack 1.3.5 which includes this fix, and the error I get is:

C:/Ruby191/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/backports/uri/common_192.rb:53:in `remove_const': constant URI::WFKV_ not defined (NameError)

(line 53 is the fix: remove_const :WFKV_)

I'm not an expert, but I'm guessing this is something particular to my setup. I'm running Ruby 1.9.1 on Win7. gem list --local produces:

addressable (2.2.6)
albacore (0.2.5)
bundler (1.0.21)
deprecated (2.0.1)
haml (3.1.3)
heroku (2.9.0)
launchy (2.0.5)
mime-types (1.16)
pik (0.2.8)
rack (1.3.5)
rack-protection (1.1.4)
rest-client (1.6.7)
rubyzip (0.9.4)
sinatra (1.3.1)
term-ansicolor (1.0.7)
tilt (1.3.3)

raggi commented Oct 22, 2011

@ternderlove - your backport, your duty :-P <3

shanev commented Oct 24, 2011

I'm getting the same error as belfryimages. Also on Ruby 1.9.1 with Rack 1.3.5. Removing this fix worked.


tenderlove commented Oct 24, 2011

Looks like this is a problem unique to Ruby 1.9.1. Do we support 1.9.1?


judofyr commented Oct 24, 2011

I don't really see the problem of adding remove_const :WFKV_ if defined?(WFKV_). It's also more future proof.


raggi commented Oct 24, 2011


rkh commented Oct 24, 2011

On Oct 24, 2011, at 07:46 , James Tucker wrote:

@tenderlove yes

Why? Do we support 1.9.0?

Reply to this email directly or view it on GitHub:
#247 (comment)


lgierth commented Oct 24, 2011

#173 explicitly restored 1.9.1 compatibility (also related to URI backport).

Trading a warning for a fatal error seems like a bad idea. @judofyr 's suggestion is a good one:
remove_const :WFKV_ if defined?(WFKV_)

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