Navigation Menu

Skip to content

Commit

Permalink
Avoid a crash when Record#inspct is called on exit
Browse files Browse the repository at this point in the history
GitHub: fix #18

Reported by Ippei Obayashi. Thanks!!!
  • Loading branch information
kou committed Jun 30, 2014
1 parent 0112ea0 commit cc6480b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/groonga/record.rb
Expand Up @@ -352,7 +352,11 @@ def added=(added)

# @private
def inspect
super.gsub(/>\z/, ", attributes: #{attributes.inspect}>")
if @table.closed?
super.gsub(/>\z/, " (closed)>")
else
super.gsub(/>\z/, ", attributes: #{attributes.inspect}>")
end
end

private
Expand Down

0 comments on commit cc6480b

Please sign in to comment.