method
inspect
v1_8_7_330 -
Show latest stable
- Class:
IRB::History
inspect()public
No documentation available.
# File lib/irb/ext/history.rb, line 85
def inspect
if @contents.empty?
return real_inspect
end
unless (last = @contents.pop)[1].equal?(self)
@contents.push last
last = nil
end
str = @contents.collect{|no, val|
if val.equal?(self)
"#{no} ...self-history..."
else
"#{no} #{val.inspect}"
end
}.join("\n")
if str == ""
str = "Empty."
end
@contents.push last if last
str
end