I’m pretty sure this is a bug, and it seem so obvious that I’m thinking
I might be doing something wrong. Check it out:
URI::InvalidURIError: the scheme http does not accept registry part:
whatever_again.domain.com (or bad hostname?)
initialize' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/uri/http.rb:78:ininitialize’
new' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/uri/common.rb:488:inparse’
When you add an underscore the sub domain it raises an exception, even
though that is a perfectly valid host name. I dug deeper and found the
=> [“http”, nil, nil, nil, “whatever_again.domain.com”, “”, nil, nil,
Notice its not recognizing the second URI as a host, which is really
strange, its actually saying its the registry.
Anyways, can anyone shed some light on this or do you have any ideas how
I can easily patch this?
Check out the split method source:
That doesn’t look to easy to patch since its one big regular expression
that breaks up the string.
Thanks for your help!