Skip to content

Commit

Permalink
Implement Text::Table#inspect to prevent #to_s being called prematurely.
Browse files Browse the repository at this point in the history
  • Loading branch information
aptinio committed Feb 3, 2015
1 parent 7b12b93 commit 42b0f78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/text-table/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,8 @@ def hashify(cell, defaults = {}) #:nodoc:
defaults.merge(cell.is_a?(Hash) ? cell : {:value => cell})
end

def inspect
"#<#{self.class}:0x#{self.__id__.to_s(16)}>"
end
end
end

0 comments on commit 42b0f78

Please sign in to comment.