summaryrefslogtreecommitdiff
path: root/lib/pry/pry_class.rb
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2019-02-24 18:32:19 +0200
committerKyrylo Silin <silin@kyrylo.org>2019-02-24 18:32:19 +0200
commit8b41db334c03d4b3afc457f3e7038155a0f45614 (patch)
tree2f5e2d470f554bdfa6dc0c1cf789b88c628c0225 /lib/pry/pry_class.rb
parent898e9d963e8f5907040acd3d144afe6930ebe023 (diff)
downloadpry-8b41db334c03d4b3afc457f3e7038155a0f45614.tar.gz
rubocop: fix offences of the Style/RedundantBegin cop
Diffstat (limited to 'lib/pry/pry_class.rb')
-rw-r--r--lib/pry/pry_class.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb
index 7384020e..f71de8e6 100644
--- a/lib/pry/pry_class.rb
+++ b/lib/pry/pry_class.rb
@@ -128,19 +128,17 @@ class Pry
end
def self.load_win32console
- begin
- require 'win32console'
- # The mswin and mingw versions of pry require win32console, so this should
- # only fail on jruby (where win32console doesn't work).
- # Instead we'll recommend ansicon, which does.
- rescue LoadError
- warn <<-WARNING if Pry.config.windows_console_warning
+ require 'win32console'
+ # The mswin and mingw versions of pry require win32console, so this should
+ # only fail on jruby (where win32console doesn't work).
+ # Instead we'll recommend ansicon, which does.
+ rescue LoadError
+ warn <<-WARNING if Pry.config.windows_console_warning
For a better Pry experience on Windows, please use ansicon:
https://github.com/adoxa/ansicon
If you use an alternative to ansicon and don't want to see this warning again,
you can add "Pry.config.windows_console_warning = false" to your pryrc.
- WARNING
- end
+ WARNING
end
# Do basic setup for initial session including: loading pryrc, plugins,