diff options
author | Kyrylo Silin <kyrylosilin@gmail.com> | 2015-02-26 09:04:42 +0200 |
---|---|---|
committer | Kyrylo Silin <kyrylosilin@gmail.com> | 2015-02-26 09:04:42 +0200 |
commit | 6dc80079c9c95021c5e27baf3a2a8da4878fd538 (patch) | |
tree | 298523767dc4e343fbba3bdc3f03a0598a5113dc /lib | |
parent | 05abf098b550451b007339cf48bfe7df0ec0b7f7 (diff) | |
download | pry-6dc80079c9c95021c5e27baf3a2a8da4878fd538.tar.gz |
file_formatter: call #around on Pry::Code instead of String
Fixes #1349 (Bug in `cat` since 0.10.1)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pry/commands/cat/file_formatter.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pry/commands/cat/file_formatter.rb b/lib/pry/commands/cat/file_formatter.rb index a7a86799..cfe96a33 100644 --- a/lib/pry/commands/cat/file_formatter.rb +++ b/lib/pry/commands/cat/file_formatter.rb @@ -40,7 +40,11 @@ class Pry end def decorate(content) - line_number ? super.around(line_number, code_window_size) : super + if line_number + super(content.around(line_number, code_window_size)) + else + super + end end def code_type |