[sup-talk] Two small fixes

Magnus Therning magnus at therning.org
Thu Sep 6 03:21:59 EDT 2007


Yesterday I ran into some warnings when using sup from SVN:

=== modified file 'lib/sup/message.rb'
--- lib/sup/message.rb  2007-09-01 06:29:01 +0000
+++ lib/sup/message.rb  2007-09-05 18:04:48 +0000
@@ -55,6 +55,7 @@
       @raw_content = encoded_content.decode
       charset = encoded_content.charset
 
+      @lines = ""
       if @content_type =~ /^text\/plain\b/
         @lines = Message.convert_from(@raw_content, charset).split("\n")
       else

=== modified file 'lib/sup/textfield.rb'
--- lib/sup/textfield.rb        2007-08-06 00:05:54 +0000
+++ lib/sup/textfield.rb        2007-09-05 18:10:35 +0000
@@ -46,6 +46,7 @@
   def position_cursor
     @w.attrset Colormap.color_for(:none)
     @w.mvaddstr @y, 0, @question
+    @value = ""
     Ncurses.curs_set 1
     Ncurses::Form.form_driver @form, Ncurses::Form::REQ_END_FIELD
     Ncurses::Form.form_driver @form, Ncurses::Form::REQ_NEXT_CHAR if @value && @value =~ / $/ # fucking RETARDED!!!!


The fixes are probably not the right ones, but they did make sup shut up about
undefined members.

-- 
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus@therning.org             Jabber: magnus.therning@gmail.com
http://therning.org/magnus

What if I don't want to obey the laws? Do they throw me in jail with
the other bad monads?
     -- Daveman


More information about the sup-talk mailing list