Flowdock
method

location

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: Unit
location(e) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/minitest/unit.rb, line 800
    def location e # :nodoc:
      last_before_assertion = ""
      e.backtrace.reverse_each do |s|
        break if s =~ /in .(assert|refute|flunk|pass|fail|raise|must|wont)/
        last_before_assertion = s
      end
      last_before_assertion.sub(/:in .*$/, '')
    end
Register or log in to add new notes.