* rack-1.2.1 breaks with ruby 1.8.6
@ 2010-07-14 14:01 candlerb
2010-07-14 14:05 ` candlerb
0 siblings, 1 reply; 5+ messages in thread
From: candlerb @ 2010-07-14 14:01 UTC (permalink / raw)
To: Rack Development
I started getting this error after upgrading from rack-1.1.0 to
rack-1.2.1:
/usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:138:in
`union': can't convert Array into String (TypeError)
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:138
It turns out to be easily fixed. ruby-1.8.7 allows two different
formats of Regexp.union:
>> Regexp.union("a","b","c")
=> /a|b|c/
>> Regexp.union(["a","b","c"])
=> /a|b|c/
but ruby-1.8.6 only allows one of these:
>> Regexp.union("a","b","c")
=> /a|b|c/
>> Regexp.union(["a","b","c"])
TypeError: can't convert Array into String
from (irb):4:in `union'
from (irb):4
from :0
So the solution is to add an "*" here in rack/utils.rb line 138:
ESCAPE_HTML_PATTERN = Regexp.union(*ESCAPE_HTML.keys)
Incidentally, I also get the following warning with -w:
/usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/server.rb:228:
warning: parenthesize argument(s) for future version
The solution is to change that line from
options.merge! opt_parser.parse! args
to
options.merge! opt_parser.parse!(args)
Regards, Brian.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rack-1.2.1 breaks with ruby 1.8.6
2010-07-14 14:01 rack-1.2.1 breaks with ruby 1.8.6 candlerb
@ 2010-07-14 14:05 ` candlerb
2010-07-14 15:56 ` James Tucker
0 siblings, 1 reply; 5+ messages in thread
From: candlerb @ 2010-07-14 14:05 UTC (permalink / raw)
To: Rack Development
Oops, I checked in git, and the ESCAPE_HTML fix is already in there.
Sorry for the noise.
The parenthesize warning still is present though, now at lib/rack/
server.rb line 233.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rack-1.2.1 breaks with ruby 1.8.6
2010-07-14 14:05 ` candlerb
@ 2010-07-14 15:56 ` James Tucker
2010-07-14 16:39 ` Christian Neukirchen
0 siblings, 1 reply; 5+ messages in thread
From: James Tucker @ 2010-07-14 15:56 UTC (permalink / raw)
To: rack-devel
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
On 14 Jul 2010, at 15:05, candlerb wrote:
> Oops, I checked in git, and the ESCAPE_HTML fix is already in there.
> Sorry for the noise.
>
> The parenthesize warning still is present though, now at lib/rack/
> server.rb line 233.
Yeah, chris2, I know it's rapid, but can we roll a new release soon, pretty please? <3
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3679 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rack-1.2.1 breaks with ruby 1.8.6
2010-07-14 15:56 ` James Tucker
@ 2010-07-14 16:39 ` Christian Neukirchen
2010-07-14 17:00 ` James Tucker
0 siblings, 1 reply; 5+ messages in thread
From: Christian Neukirchen @ 2010-07-14 16:39 UTC (permalink / raw)
To: rack-devel
James Tucker <jftucker@gmail.com> writes:
> On 14 Jul 2010, at 15:05, candlerb wrote:
>
>> Oops, I checked in git, and the ESCAPE_HTML fix is already in there.
>> Sorry for the noise.
>>
>> The parenthesize warning still is present though, now at lib/rack/
>> server.rb line 233.
>
> Yeah, chris2, I know it's rapid, but can we roll a new release soon, pretty please? <3
I have zilch time before mid August.
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rack-1.2.1 breaks with ruby 1.8.6
2010-07-14 16:39 ` Christian Neukirchen
@ 2010-07-14 17:00 ` James Tucker
0 siblings, 0 replies; 5+ messages in thread
From: James Tucker @ 2010-07-14 17:00 UTC (permalink / raw)
To: rack-devel
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
On 14 Jul 2010, at 17:39, Christian Neukirchen wrote:
> James Tucker <jftucker@gmail.com> writes:
>
>> On 14 Jul 2010, at 15:05, candlerb wrote:
>>
>>> Oops, I checked in git, and the ESCAPE_HTML fix is already in there.
>>> Sorry for the noise.
>>>
>>> The parenthesize warning still is present though, now at lib/rack/
>>> server.rb line 233.
>>
>> Yeah, chris2, I know it's rapid, but can we roll a new release soon, pretty please? <3
>
> I have zilch time before mid August.
Ok, I shall try to get everything together by then to save you any time, and in the meantime, may I use "mid August" as the loosely expected time for next release?
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3679 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-14 17:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-14 14:01 rack-1.2.1 breaks with ruby 1.8.6 candlerb
2010-07-14 14:05 ` candlerb
2010-07-14 15:56 ` James Tucker
2010-07-14 16:39 ` Christian Neukirchen
2010-07-14 17:00 ` James Tucker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).