Skip to content

Commit dcc14cb

Browse files
committed
Pry::Terminal no longer exists
ref pry/pry@67b0b53
1 parent 70bc96b commit dcc14cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/power_assert/inspector.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def initialize(value, indent)
4343
def inspect
4444
if PowerAssert.configuration._colorize_message
4545
if PowerAssert.configuration._use_pp
46-
width = [Pry::Terminal.width! - 1 - @indent, 10].max
46+
width = [(defined?(Pry::Terminal) ? Pry::Terminal.width! : Pry.new(output: StringIO.new).output.width) - 1 - @indent, 10].max
4747
Pry::ColorPrinter.pp(@value, '', width)
4848
else
4949
Pry::Code.new(@value.inspect).highlighted

0 commit comments

Comments
 (0)