lib/pycall/pyerror.rb in pycall-0.1.0.alpha.20170419b vs lib/pycall/pyerror.rb in pycall-0.1.0.alpha.20170419
- old
+ new
@@ -23,12 +23,11 @@
attr_reader :type, :value, :traceback
def to_s
"#{type}: #{value}".tap do |msg|
unless traceback.nil? || traceback.null?
- if (strs = PyCall.format_traceback(traceback))
- msg << "\n"
- strs.each {|s| msg << s }
+ if (o = PyCall.format_traceback(traceback))
+ msg.concat("\n", *o)
end
end
end
end
end