Cédric Boutillier
2012-May-23 16:36 UTC
[rubytorrent-devel] patches to make rubytorrent work with Ruby1.9
Hi! During the process of adapting the Debian package for rubytorrent to Ruby 1.9, I have detected some minor syntax changes leading to errors with Ruby1.9. I''ve prepared two patches to solve these issues, based on the 0.3 version of the gem distributed by www.rubygems.org. The first patch, convert_break_into_return_outside_a_loop.patch replaces a break statement by a return inside step method in lib/rubytorrent/controller.rb, as this is not allowed in Ruby1.9 syntax (Syntax Error, Invalid break). The second one, fix_fetching_ascii_codes_from_chars.patch, tries to solve the way characters and their ascii codes are extracted from strings. I am using the .chr and .ord methods working with both Ruby 1.8 and 1.9. I send these to the list for the record. Thanks! C?dric -------------- next part -------------- A non-text attachment was scrubbed... Name: fix_fetching_ascii_codes_from_chars.patch Type: text/x-diff Size: 3071 bytes Desc: not available URL: <http://rubyforge.org/pipermail/rubytorrent-devel/attachments/20120523/b6d043fe/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: convert_break_into_return_outside_a_loop.patch Type: text/x-diff Size: 689 bytes Desc: not available URL: <http://rubyforge.org/pipermail/rubytorrent-devel/attachments/20120523/b6d043fe/attachment-0001.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://rubyforge.org/pipermail/rubytorrent-devel/attachments/20120523/b6d043fe/attachment-0002.bin>