http://github.com/rtomayko/rack/commits/ruby19
git://github.com/rtomayko/rack.git
Please review. I'd very much like to merge.
HOWTO RUN SPECS UNDER 1.9
Mongrel, thin, and fcgi all fail to compile/install under 1.9. The
fulltest suite relies on these libraries being present so I'm not yet
able to establish how much additional work is hiding in those specs.
Running the specs under 1.9 took a bit of fiddling in general:
* The most recent version of the test-spec gem is required.
* The test-unit gem is required (test-spec will not run on miniunit).
Once those pieces are in place, you should be able to run the basic test
suite with: `rake`; or, run a specific set of specs with:
$ RUBYOPT=rubygems specrb -Ilib:test test/spec_rack_lint.rb
OTHER ISSUES WITH RUBY 1.9
When I started in on this, I assumed that String#each was going to be
the big killer but it turns out we have a bunch of other issues to
consider.
* String#length is used throughout specs and code to determine the
length of response bodies. String#bytesize should be used instead. I've
fixed all spec failures but there may be other places where #length is
used that have not yet surfaced.
* Array#to_s is used in various specs to turn Array response bodies into
Strings. In Ruby 1.8, Array#to_s works like Array#join; in Ruby 1.9,
Array#to_s acts like Array#inspect. Breakage ensues. I've converted all
cases surfaced by specs to use #join but I wouldn't be surprised if
there were additional bugs of this sort hiding elsewhere.
* File.read assumes the default external encoding. This causes binary
data to be treated as UTF-8 in some cases but usually doesn't surface
until a Regexp match or some similar operation is performed. I've
changed most cases surfaced by specs to instead use:
File.open(fn, 'rb') { |f| f.read }
I plan on spending some serious time with ack trying to root out any
remaining issues that aren't being surfaced by specs but I feel what's
on the branch now is a good start.
Thanks
--
Ryan http://tomayko.com/about
> I have a ruby19 branch that passes all Rack specs in the basic test
> suite and most in the fulltest suite without adding anything to core
> ruby objects (e.g., String#each):
>
> http://github.com/rtomayko/rack/commits/ruby19
> git://github.com/rtomayko/rack.git
>
> Please review. I'd very much like to merge.
+1, thanks a lot for your efforts.
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org
>
> Ryan Tomayko <r...@tomayko.com> writes:
>
>> I have a ruby19 branch that passes all Rack specs in the basic test
>> suite and most in the fulltest suite without adding anything to core
>> ruby objects (e.g., String#each):
>>
>> http://github.com/rtomayko/rack/commits/ruby19
>> git://github.com/rtomayko/rack.git
>>
>> Please review. I'd very much like to merge.
>
> +1, thanks a lot for your efforts.
Did a quick merge of master, then a diff, summary of changes is here: http://pastie.textmate.org/private/0bmxewr9c2wfv2nkferyda
+1, well done
> Did a quick merge of master, then a diff, summary of changes is here: http://pastie.textmate.org/private/0bmxewr9c2wfv2nkferyda
I use my alternative git viewer for reviewing biggish changes:
http://vuxu.org/git2/rack-github/(master)rtomayko--ruby19
--
stadik.net
Yay!
Thanks everyone,
Ryan