[holy ruby programmers batman!] [BUGFIX] history_to_vi throws an IndexError

Markus Prinz markus.prinz at qsig.org
Sun Dec 23 14:57:13 EST 2007


Hi,

history_to_vi throws an Index error:

$ irb
 >> "test"
=> "test"
 >> history_to_vi
IndexError: invalid index
         from /Library/Ruby/Gems/1.8/gems/utility_belt-1.0.6/lib/ 
command_history.rb:81:in `[]'
         from /Library/Ruby/Gems/1.8/gems/utility_belt-1.0.6/lib/ 
command_history.rb:81:in `get_lines'
         from /Library/Ruby/Gems/1.8/gems/utility_belt-1.0.6/lib/ 
command_history.rb:80:in `each'
         from /Library/Ruby/Gems/1.8/gems/utility_belt-1.0.6/lib/ 
command_history.rb:80:in `get_lines'
         from /Library/Ruby/Gems/1.8/gems/utility_belt-1.0.6/lib/ 
command_history.rb:63:in `history_to_vi'
         from (irb):2
         from:0

The attached patch fixes that.

regards, Markus


More information about the Utilitybelt-tinkering mailing list