summaryrefslogtreecommitdiff
path: root/spec/indent_spec.rb
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2019-05-26 10:42:52 +0300
committerKyrylo Silin <silin@kyrylo.org>2019-05-26 17:11:42 +0300
commit67b0b53f0bf9513d65fe7ad8df27e9da4a759c98 (patch)
treeb724d0c3b093488c450428b2588be692f49a4523 /spec/indent_spec.rb
parent28cf3e9fa83ac5e602a18917fdb8b1539c06ca96 (diff)
downloadpry-67b0b53f0bf9513d65fe7ad8df27e9da4a759c98.tar.gz
Merge Pry::Terminal with Pry::Output
Fixes #1991 (Pry in a non-stdin/stdout PTY uses incorrect window size on non-JRuby platforms) `Pry::Terminal` was built without custom outputs in mind. We would always assume that `$stdout` is what the user wants. This contradicted the `output` config option. Thanks to `Pry::Output`, which we use internally, we can decorate the output that the user passes us with "size" methods. If we do that, we get improved output support for free, so that PTY's `slave` can be passed to Pry and would be able to determine its size correctly (example from #1991). I do suspect that there are still some gotchas. Some commands or portions of code may still be assuming that `$stdout` is the only possible option. This has to be addressed separately, in the scope of https://github.com/pry/pry/issues/1988. The more tests we add, the easier it will be to uncover those spots.
Diffstat (limited to 'spec/indent_spec.rb')
-rw-r--r--spec/indent_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/indent_spec.rb b/spec/indent_spec.rb
index aa48379f..29c07a5f 100644
--- a/spec/indent_spec.rb
+++ b/spec/indent_spec.rb
@@ -5,7 +5,7 @@
# lines.
describe Pry::Indent do
before do
- @indent = Pry::Indent.new
+ @indent = Pry::Indent.new(Pry.new)
end
it 'should indent an array' do