diff --git a/lib/docx/helpers.rb b/lib/docx/helpers.rb index 257845d..ef1a4af 100644 --- a/lib/docx/helpers.rb +++ b/lib/docx/helpers.rb @@ -4,7 +4,7 @@ module SimpleInspect # than the default inspect method. But you can still get the default inspect method by passing # true as the first argument. def inspect(full = false) - return(super) if full + return super() if full variable_values = instance_variables.map do |var| diff --git a/spec/docx/helpers_spec.rb b/spec/docx/helpers_spec.rb index 55608f1..83c8766 100644 --- a/spec/docx/helpers_spec.rb +++ b/spec/docx/helpers_spec.rb @@ -24,5 +24,10 @@ def initialize expect(object.inspect).to include(%(@long="#{'x' * 100}...)) expect(object.inspect.length).to be < 300 end + + # Regression test for #191 + it 'falls back to the default inspect when asked for the full output' do + expect(object.inspect(true)).to include('x' * 500) + end end end