lib/ffi-tk/ffi/tcl/interp.rb in ffi-tk-2009.12.14 vs lib/ffi-tk/ffi/tcl/interp.rb in ffi-tk-2010.01

- old
+ new

@@ -28,9 +28,12 @@ Tcl.new_boolean_obj(0) when String Tcl.new_string_obj(ruby_obj, ruby_obj.bytesize) when Fixnum Tcl.new_int_obj(ruby_obj) + when Exception + string = [ruby_obj.message, *ruby_obj.backtrace].join("\n") + Tcl.new_string_obj(string, string.bytesize) else if ruby_obj.respond_to?(:to_tcl) ruby_obj.to_tcl else raise ArgumentError, "Don't know how to set %p automatically" % [ruby_obj]