Sha256: b313a1633ab751c6d4e2bb5992f0450acb2cdcade2e0fb22439af4f835c84659

Contents?: true

Size: 402 Bytes

Versions: 10

Compression:

Stored size: 402 Bytes

Contents

#!/usr/bin/env ruby
require 'ruby-prof'

# Make sure this works with no class or method
result = RubyProf.profile do
  sleep 1
end

methods = result.threads.values.first
global_method = methods.sort_by {|method| method.full_name}.first
if global_method.full_name != 'Global#[No method]'
  raise(RuntimeError, "Wrong method name.  Expected: Global#[No method].  Actual: #{global_method.full_name}")
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
ruby-prof-0.10.8 test/no_method_class_test.rb
ruby-prof-0.10.7 test/no_method_class_test.rb
ruby-prof-0.10.6 test/no_method_class_test.rb
ruby-prof-0.10.5 test/no_method_class_test.rb
ruby-prof-0.10.4 test/no_method_class_test.rb
ruby-prof-0.10.2 test/no_method_class_test.rb
acunote-ruby-prof-0.9.2 test/no_method_class_test.rb
ruby-prof-0.9.2 test/no_method_class_test.rb
ruby-prof-0.9.1 test/no_method_class_test.rb
ruby-prof-0.9.0 test/no_method_class_test.rb