Michael Neumann
11/11/2003 12:11:00 PM
Hi,
In Ruby-1.8.1 and before, lib/test/unit/ui/gtk/testrunner.rb contains
some errors. The set_font resuce-clause is because this font may not be
available on some platforms, in which case the program would abort.
Here's the patch:
--- /tmp/ruby-1.8.1/lib/test/unit/ui/gtk/testrunner.rb Wed Feb 12 05:22:35 2003
+++ testrunner.rb Tue Nov 11 12:50:46 2003
@@ -100,12 +100,12 @@
end
def show_fault(fault) # :nodoc:
- raw_show_fault(fault.longDisplay)
+ raw_show_fault(fault.long_display)
end
def raw_show_fault(string) # :nodoc:
- faultDetailLabel.set_text(string)
- outerDetailSubPanel.queue_resize
+ fault_detail_label.set_text(string)
+ outer_detail_sub_panel.queue_resize
end
def clear_fault # :nodoc:
@@ -328,7 +328,9 @@
@fault_detail_label = EnhancedLabel.new("")
style = Gtk::Style.new
font = Gdk::Font.font_load("-*-Courier New-medium-r-normal--*-120-*-*-*-*-*-*")
- style.set_font(font)
+ begin
+ style.set_font(font)
+ rescue ArgumentError; end
@fault_detail_label.set_style(style)
@fault_detail_label.set_justify(Gtk::JUSTIFY_LEFT)
@fault_detail_label.set_line_wrap(false)
----------------------
Regards,
Michael