You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/ruby-debug-ide/xml_printer.rb
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
require'stringio'
2
2
require'cgi'
3
3
require'monitor'
4
-
require'objspace'
4
+
if(!defined?(JRUBY_VERSION))
5
+
require'objspace'
6
+
end
5
7
6
8
moduleDebugger
7
9
@@ -15,7 +17,7 @@ class MemoryLimitError < StandardError
15
17
attr_reader:message
16
18
attr_reader:backtrace
17
19
18
-
definitialize(message,backtrace='')
20
+
definitialize(message,backtrace=[])
19
21
@message=message
20
22
@backtrace=backtrace
21
23
end
@@ -25,7 +27,7 @@ class TimeLimitError < StandardError
25
27
attr_reader:message
26
28
attr_reader:backtrace
27
29
28
-
definitialize(message,backtrace='')
30
+
definitialize(message,backtrace=[])
29
31
@message=message
30
32
@backtrace=backtrace
31
33
end
@@ -183,7 +185,7 @@ def exec_with_allocation_control(value, memory_limit, time_limit, exec_method, o
183
185
curr_time=Time.now.to_f
184
186
185
187
if((curr_time - start_time) * 1e3 > time_limit)
186
-
curr_thread.raiseTimeLimitError.new("Timeout: evaluation of #{exec_method} took longer than #{time_limit}ms.","#{caller.map{|l| "\t#{l}"}.join("\n")}")
188
+
curr_thread.raiseTimeLimitError.new("Timeout: evaluation of #{exec_method} took longer than #{time_limit}ms.",caller.to_a)
187
189
inspect_thread.kill
188
190
end
189
191
@@ -192,7 +194,7 @@ def exec_with_allocation_control(value, memory_limit, time_limit, exec_method, o
curr_thread.raiseMemoryLimitError.new("Out of memory: evaluation of #{exec_method} took more than #{memory_limit}mb.","#{caller.map{|l| "\t#{l}"}.join("\n")}")
197
+
curr_thread.raiseMemoryLimitError.new("Out of memory: evaluation of #{exec_method} took more than #{memory_limit}mb.",caller.to_a)
196
198
inspect_thread.kill
197
199
end
198
200
end
@@ -205,8 +207,7 @@ def exec_with_allocation_control(value, memory_limit, time_limit, exec_method, o
0 commit comments