Skip to content

Commit

Permalink
Do not assume all interpreter versions support allocation tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
methodmissing committed Dec 7, 2014
1 parent fb60daa commit 2f75078
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
if ENV['DISCOURSE_DUMP_HEAP'] == "1"
require 'objspace'
ObjectSpace.trace_object_allocations_start
begin
ObjectSpace.trace_object_allocations_start
rescue NoMethodError
puts "Heap dumps not available for Ruby #{RUBY_VERSION} (> 2.1 required)"
end
end

require 'rubygems'
Expand Down

0 comments on commit 2f75078

Please sign in to comment.