Remove more 1.9 related workarounds
This commit is contained in:
parent
b2f8820a5b
commit
4482640fad
|
@ -346,14 +346,6 @@ class Pry
|
|||
''.respond_to?(method_name, include_private) || super
|
||||
end
|
||||
|
||||
if RUBY_VERSION.start_with?('1.9')
|
||||
# @todo This is needed for Ruby 1.9 support where `lines` return an
|
||||
# Enumerator. Newer Rubies return an Array
|
||||
def lines
|
||||
super.to_a
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
# An abstraction of the `dup.instance_eval` pattern used throughout this
|
||||
|
|
|
@ -246,12 +246,7 @@ class Pry
|
|||
method_candidates.count
|
||||
end
|
||||
|
||||
# @note On JRuby 1.9 and higher, in certain conditions, this method chucks
|
||||
# away its ability to be quick (when there are lots of monkey patches,
|
||||
# like in Rails). However, it should be efficient enough on other rubies.
|
||||
# @see https://github.com/jruby/jruby/issues/525
|
||||
# @return [Enumerator, Array] on JRuby 1.9 and higher returns Array, on
|
||||
# other rubies returns Enumerator
|
||||
# @return [Array]
|
||||
def candidates
|
||||
enum = Enumerator.new do |y|
|
||||
(0...number_of_candidates).each do |num|
|
||||
|
|
|
@ -47,7 +47,7 @@ RSpec.describe Pry::ExceptionHandler do
|
|||
end
|
||||
|
||||
before do
|
||||
if RUBY_VERSION.start_with?('1.9', '2.0')
|
||||
if RUBY_VERSION.start_with?('2.0')
|
||||
skip("Ruby #{RUBY_VERSION} doesn't support nested exceptions")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,9 +10,6 @@ RSpec.describe "Hanami integration" do
|
|||
end
|
||||
|
||||
it "does not enter an infinite loop (#1471, #1621)" do
|
||||
if RUBY_VERSION.start_with? "1.9"
|
||||
skip "prepend is not supported on this version of Ruby"
|
||||
end
|
||||
code = <<-RUBY
|
||||
require "pry"
|
||||
require "timeout"
|
||||
|
|
Loading…
Reference in New Issue