summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/highline/simulate.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/highline/simulate.rb b/lib/highline/simulate.rb
index a39c1f1..152979b 100644
--- a/lib/highline/simulate.rb
+++ b/lib/highline/simulate.rb
@@ -51,11 +51,11 @@ class HighLine
# will feed the input operations when simulating.
def self.with(*strings)
- @input = $terminal.instance_variable_get :@input
- $terminal.instance_variable_set :@input, new(strings)
+ @input = HighLine.default_instance.instance_variable_get :@input
+ HighLine.default_instance.instance_variable_set :@input, new(strings)
yield
ensure
- $terminal.instance_variable_set :@input, @input
+ HighLine.default_instance.instance_variable_set :@input, @input
end
end
end