We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70bc96b commit dcc14cbCopy full SHA for dcc14cb
lib/power_assert/inspector.rb
@@ -43,7 +43,7 @@ def initialize(value, indent)
43
def inspect
44
if PowerAssert.configuration._colorize_message
45
if PowerAssert.configuration._use_pp
46
- width = [Pry::Terminal.width! - 1 - @indent, 10].max
+ width = [(defined?(Pry::Terminal) ? Pry::Terminal.width! : Pry.new(output: StringIO.new).output.width) - 1 - @indent, 10].max
47
Pry::ColorPrinter.pp(@value, '', width)
48
else
49
Pry::Code.new(@value.inspect).highlighted
0 commit comments