diff options
author | André Luis Leal Cardoso Junior <andrehjr@gmail.com> | 2022-03-09 19:37:15 -0300 |
---|---|---|
committer | André Luis Leal Cardoso Junior <andrehjr@gmail.com> | 2022-03-10 00:01:28 -0300 |
commit | 4482640fadbbb422db05d89ddbe82b97a945e999 (patch) | |
tree | 975da34adef1eddeda635ade343ac3dda2b90c79 /lib | |
parent | b2f8820a5b1539c16ce0e6005f382a3abcfef76d (diff) | |
download | pry-4482640fadbbb422db05d89ddbe82b97a945e999.tar.gz |
Remove more 1.9 related workarounds
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pry/code.rb | 8 | ||||
-rw-r--r-- | lib/pry/wrapped_module.rb | 7 |
2 files changed, 1 insertions, 14 deletions
diff --git a/lib/pry/code.rb b/lib/pry/code.rb index 1fb206c4..3f3f9238 100644 --- a/lib/pry/code.rb +++ b/lib/pry/code.rb @@ -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 diff --git a/lib/pry/wrapped_module.rb b/lib/pry/wrapped_module.rb index c21b2a01..89173dcd 100644 --- a/lib/pry/wrapped_module.rb +++ b/lib/pry/wrapped_module.rb @@ -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| |