diff --git a/lib/awesome_print/formatters/base_formatter.rb b/lib/awesome_print/formatters/base_formatter.rb index 2e6b367..802a90b 100644 --- a/lib/awesome_print/formatters/base_formatter.rb +++ b/lib/awesome_print/formatters/base_formatter.rb @@ -32,7 +32,12 @@ module AwesomePrint end def get_limit_size - options[:limit] ? DEFAULT_LIMIT_SIZE : options[:limit] + case options[:limit] + when true + DEFAULT_LIMIT_SIZE + else + options[:limit] + end end def limited(data, width, is_hash = false)