lib/ffi/clang/diagnostic.rb in ffi-clang-0.3.0 vs lib/ffi/clang/diagnostic.rb in ffi-clang-0.5.0

- old
+ new

@@ -18,12 +18,12 @@ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -require 'ffi/clang/lib/diagnostic' -require 'ffi/clang/source_range' +require_relative 'lib/diagnostic' +require_relative 'source_range' module FFI module Clang class Diagnostic < AutoPointer def self.default_display_opts @@ -95,9 +95,13 @@ Lib.extract_string Lib.get_diagnostic_category_text(self) end def category_id Lib.get_diagnostic_category(self) + end + + def inspect + "#{self.location}: #{self.format}" end private def display_opts(opts)