[ditz-talk] Better 1.9.2 compatibility patch..

Stephen Waits steve at waits.net
Wed Feb 23 04:58:59 EST 2011


Ok, I think this is a more complete patch than the one I posted earlier. I ran through all the commands against my 1.9.2 and they appear to work fine.

I've intentionally kept the changes to the absolute minimum necessary to get things working.

Things I had to change:

Replace #!/usr/bin/ruby18 with just #!/usr/bin/env ruby
In one case, raise RuntimeError instead of (the undefined) Error
Use Proc.new instead of lambda in the model object generators. lambda is strict about the number of arguments it receives. Procs don't care - they'll ignore unused arguments, and fill in missing arguments with nil.
Require 'digest/sha1' (instead of 'sha1') and replace SHA1 with Digest::SHA1
Replace strange [success,value] return of generate_field_value - now either returns a value (which may be nil), or :generate_failed

Please review the attached patch and consider applying it, if it meets your satisfaction.

Thanks!



--
Stephen Waits
steve at waits.net

  WAR IS PEACE
  FREEDOM IS SLAVERY
  IGNORANCE IS STRENGTH   1984, George Orwell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ditz-talk/attachments/20110223/3f5184df/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ditz-0.5-ruby192.patch
Type: application/octet-stream
Size: 4829 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/ditz-talk/attachments/20110223/3f5184df/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ditz-talk/attachments/20110223/3f5184df/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4219 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/ditz-talk/attachments/20110223/3f5184df/attachment.bin>


More information about the ditz-talk mailing list