diff --git a/Support/RubyMate/catch_exception.rb b/Support/RubyMate/catch_exception.rb
index e3eada2..8022340 100644
--- a/Support/RubyMate/catch_exception.rb
+++ b/Support/RubyMate/catch_exception.rb
@@ -18,8 +18,9 @@
dirs = [ '.', ENV['TM_PROJECT_DIRECTORY'], ENV['TM_DIRECTORY'] ]
e.backtrace.each do |b|
- if b =~ /(.*?):(\d+)(?::in\s*`(.*?)')?/ then
- file, line, method = $1, $2, $3
+ if b =~ /(.*?):(\d+)(?::in\s*`(.*?)'(.*))?/m then
+ file, line, method, tail = $1, $2, $3, $4.to_s.strip
+ tail = tail.gsub("\n","
").gsub(" ", " ") if tail.include?("\n")
url, display_name = '', file
path = dirs.map{ |dir| File.expand_path(file, dir) }.find{ |filename| File.file? filename }
@@ -27,9 +28,10 @@
url, display_name = '&url=file://' + e_url(path), File.basename(path)
end
- io << "