pry 0.11.0.pre2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b4d95eb8fb6676f8d3da49a95ef49319e22c4bb
4
- data.tar.gz: 3c0c2bb2556fa7346343a7fb54930c24f592e361
3
+ metadata.gz: 0f20330774f19c00e3a45550490cc68ad1a0892d
4
+ data.tar.gz: 4576abab2169c70a2b7a156a69773e6ca5412af0
5
5
  SHA512:
6
- metadata.gz: ac99b090f024df10b494c4ea4f78ab8d8be77e05c8c38f425687a2b7d6560c1b4e8d919fdb5faabe1b7b84ea21f9a2cc374e6f0db45a3ab392bcbcdb19cae12b
7
- data.tar.gz: 80a8082cb1892eda93431d68f30facac103467d84c251c2193ed03a73f6ae3696433d56d90e949fcccd21da0c74a7ad7c301ffbdd55461b78efe24d08ccd35b8
6
+ metadata.gz: 692d6918bd3b8e775eafdb453b9d0103385887b6d6e1c884ad8e17f0da5b51cd90d02a9b03fc1cecfcbdc80503207f9d2c7dee8b813db1e6845ca33cc8de7625
7
+ data.tar.gz: c1599009f2077755538bb189b6a5bd47baf28611efc612b5039411a10042f9995dad3d5c3dfb48715e8c244781e892377560005e75bb174ab2c5316fba8839f2
@@ -1,7 +1,14 @@
1
1
  ### HEAD
2
- * Use `less` or system pager pager on MS Windows if it is available. [#1512](https://github.com/pry/pry/pull/1512)
3
- * Add `Pry.configure` as an alternative to the current way of changing configuration options in `.pryrc` files. [#1502](https://github.com/pry/pry/pull/1502)
4
- * Add `Pry::Config::Behavior#eager_load!` to add a possible workaround for issues like [#1501](https://github.com/pry/pry/issues/1501)
2
+
3
+ * Add alias 'whereami[?!]+' for 'whereami' command. ([#1597](https://github.com/pry/pry/pull/1597))
4
+ * Improve Ruby 2.4 support ([#1611](https://github.com/pry/pry/pull/1611)):
5
+ * Deprecated constants are hidden from `ls` output by default, use the `-d` switch to see them.
6
+ * Fix warnings that originate in Pry while using the repl.
7
+ * Improve completion speed in large applications. ([#1588](https://github.com/pry/pry/pull/1588))
8
+ * Pry::ColorPrinter.pp: add `newline` argument and pass it on to PP. ([#1603](https://github.com/pry/pry/pull/1603))
9
+ * Use `less` or system pager pager on MS Windows if it is available. ([#1512](https://github.com/pry/pry/pull/1512))
10
+ * Add `Pry.configure` as an alternative to the current way of changing configuration options in `.pryrc` files. ([#1502](https://github.com/pry/pry/pull/1502))
11
+ * Add `Pry::Config::Behavior#eager_load!` to add a possible workaround for issues like ([#1501](https://github.com/pry/pry/issues/1501))
5
12
  * Remove Slop as a runtime dependency by vendoring v3.4 as Pry::Slop.
6
13
  People can depend on Slop v4 and Pry at the same time without running into version conflicts. ([#1497](https://github.com/pry/pry/issues/1497))
7
14
  * Fix auto-indentation of code that uses a single-line rescue ([#1450](https://github.com/pry/pry/issues/1450))
@@ -31,7 +38,7 @@
31
38
  * Implemented support for CDPATH for ShellCommand ([#1433](https://github.com/pry/pry/issues/1433), [#1434](https://github.com/pry/pry/issues/1434))
32
39
  * `Pry::CLI.parse_options` does not start Pry anymore ([#1393](https://github.com/pry/pry/pull/1393))
33
40
  * The gem uses CPU-less platforms for Windows now ([#1410](https://github.com/pry/pry/pull/1410))
34
- * Add `Pry::Config::Lazy` to make it easier to reimplement `Pry::Config::Default` without knowing its implementation [#1503](https://github.com/pry/pry/pull/1503/)
41
+ * Add `Pry::Config::Memoization` to make it easier to implement your own `Pry::Config::Default` class.([#1503](https://github.com/pry/pry/pull/1503/))
35
42
  * Lazy load the config defaults for `Pry.config.history` and `Pry.config.gist`.
36
43
 
37
44
  ### 0.10.1
data/README.md CHANGED
@@ -1,9 +1,8 @@
1
1
  [![Build Status](https://img.shields.io/travis/pry/pry.svg)](https://travis-ci.org/pry/pry)
2
2
  [![Code Climate](https://img.shields.io/codeclimate/github/pry/pry.svg)](https://codeclimate.com/github/pry/pry)
3
3
  [![Inline docs](http://inch-ci.org/github/pry/pry.svg?style=shields)](http://inch-ci.org/github/pry/pry)
4
-
5
- <center>
6
- ![The Pry Logo](https://dl.dropbox.com/u/26521875/pry%20stuff/logo/pry_logo_350.png)
4
+ <br><br>
5
+ ![logo for Pry](https://dl.dropbox.com/u/26521875/pry%20stuff/logo/pry_logo_350.png)
7
6
 
8
7
  © John Mair ([banisterfiend](https://twitter.com/banisterfiend)) 2016<br>
9
8
 
@@ -15,13 +14,13 @@
15
14
  [Atomic Object](https://atomicobject.com/)<br/>
16
15
  [Hashrocket](https://hashrocket.com/)<br/>
17
16
  [Intridea](http://www.intridea.com)<br/>
18
- [Gaslight](https://teamgaslight.com/home)<br/>
17
+ [Gaslight](https://teamgaslight.com)<br/>
19
18
 
20
19
  **Other Resources**
21
20
 
22
21
  [Skip to the website (recommended)](http://pryrepl.org/) <br />
23
22
  [Skip to the wiki](https://github.com/pry/pry/wiki)
24
- </center>
23
+
25
24
 
26
25
  Pry is a powerful alternative to the standard IRB shell for Ruby. It is
27
26
  written from scratch to provide a number of advanced features,
data/lib/pry.rb CHANGED
@@ -2,12 +2,11 @@
2
2
  # MIT License
3
3
  #
4
4
  require 'pp'
5
-
5
+ require 'pry/forwardable'
6
6
  require 'pry/input_lock'
7
7
  require 'pry/exceptions'
8
8
  require 'pry/helpers/base_helpers'
9
9
  require 'pry/hooks'
10
- require 'forwardable'
11
10
 
12
11
  class Pry
13
12
  # The default hooks - display messages when beginning and ending Pry sessions.
@@ -338,7 +338,7 @@ class Pry
338
338
  undef =~
339
339
 
340
340
  # Check whether String responds to missing methods.
341
- def respond_to_missing?(name, include_all = false)
341
+ def respond_to_missing?(name, include_all=false)
342
342
  ''.respond_to?(name, include_all)
343
343
  end
344
344
 
@@ -12,8 +12,8 @@ class Pry
12
12
 
13
13
  CodeRay::Encoders::Terminal::TOKEN_COLORS[:comment][:self] = "\e[1;34m"
14
14
 
15
- def self.pp(obj, out = $>, width = 79)
16
- q = ColorPrinter.new(out, width)
15
+ def self.pp(obj, out = $>, width = 79, newline = "\n")
16
+ q = ColorPrinter.new(out, width, newline)
17
17
  q.guard_inspect_key { q.pp obj }
18
18
  q.flush
19
19
  out << "\n"
@@ -31,7 +31,13 @@ class Pry
31
31
  end
32
32
 
33
33
  def pp(obj)
34
- super
34
+ if String === obj
35
+ # Avoid calling Ruby 2.4+ String#pretty_print that prints multiline
36
+ # Strings prettier
37
+ Object.instance_method(:pretty_print).bind(obj).call
38
+ else
39
+ super
40
+ end
35
41
  rescue => e
36
42
  raise if e.is_a? Pry::Pager::StopPaging
37
43
  begin
@@ -157,7 +157,7 @@ class Pry
157
157
  case opts[:i]
158
158
  when Range
159
159
  (_pry_.input_array[opts[:i]] || []).join
160
- when Fixnum
160
+ when Integer
161
161
  _pry_.input_array[opts[:i]] || ""
162
162
  else
163
163
  raise Pry::CommandError, "Not a valid range: #{opts[:i]}"
@@ -61,7 +61,9 @@ class Pry
61
61
  " " * 32 << "Constants that are pending autoload? are also shown (in yellow)"
62
62
  opt.on :i, :ivars, "Show instance variables (in blue) and class variables (in bright blue)"
63
63
  opt.on :G, :grep, "Filter output by regular expression", :argument => true
64
-
64
+ if Object.respond_to?(:deprecate_constant)
65
+ opt.on :d, :dconstants, "Show deprecated constants"
66
+ end
65
67
  if jruby?
66
68
  opt.on :J, "all-java", "Show all the aliases for methods from java (default is to show only prettiest)"
67
69
  end
@@ -3,15 +3,17 @@ require 'pry/commands/ls/interrogatable'
3
3
  class Pry
4
4
  class Command::Ls < Pry::ClassCommand
5
5
  class Constants < Pry::Command::Ls::Formatter
6
+ DEPRECATED_CONSTANTS = [:Fixnum, :Bignum, :TimeoutError, :NIL, :FALSE, :TRUE]
7
+ DEPRECATED_CONSTANTS << :JavaPackageModuleTemplate if Pry::Helpers::BaseHelpers.jruby?
6
8
  include Pry::Command::Ls::Interrogatable
7
9
 
8
-
9
10
  def initialize(interrogatee, no_user_opts, opts, _pry_)
10
11
  super(_pry_)
11
12
  @interrogatee = interrogatee
12
13
  @no_user_opts = no_user_opts
13
14
  @default_switch = opts[:constants]
14
15
  @verbose_switch = opts[:verbose]
16
+ @dconstants = opts.dconstants?
15
17
  end
16
18
 
17
19
  def correct_opts?
@@ -26,8 +28,17 @@ class Pry
26
28
 
27
29
  private
28
30
 
31
+ def show_deprecated_constants?
32
+ @dconstants == true
33
+ end
34
+
29
35
  def format(mod, constants)
30
36
  constants.sort_by(&:downcase).map do |name|
37
+ if Object.respond_to?(:deprecate_constant) and
38
+ DEPRECATED_CONSTANTS.include?(name) and
39
+ !show_deprecated_constants?
40
+ next
41
+ end
31
42
  if const = (!mod.autoload?(name) && (mod.const_get(name) || true) rescue nil)
32
43
  if (const < Exception rescue false)
33
44
  color(:exception_constant, name)
@@ -193,4 +193,5 @@ class Pry
193
193
 
194
194
  Pry::Commands.add_command(Pry::Command::Whereami)
195
195
  Pry::Commands.alias_command '@', 'whereami'
196
+ Pry::Commands.alias_command /whereami[!?]+/, 'whereami'
196
197
  end
@@ -1,7 +1,7 @@
1
1
  require_relative 'basic_object'
2
2
  class Pry::Config < Pry::BasicObject
3
3
  require_relative 'config/behavior'
4
- require_relative 'config/lazy'
4
+ require_relative 'config/memoization'
5
5
  require_relative 'config/default'
6
6
  require_relative 'config/convenience'
7
7
  include Pry::Config::Behavior
@@ -141,9 +141,10 @@ module Pry::Config::Behavior
141
141
  end
142
142
 
143
143
  def eager_load!
144
- local_last_default = last_default
145
- local_last_default.lazy_keys.each do |key|
146
- self[key] = local_last_default.public_send(key)
144
+ default = @default
145
+ while default
146
+ default.memoized_methods.each {|method| self[key] = default.public_send(key)} if default.respond_to?(:memoized_methods)
147
+ default = @default.default
147
148
  end
148
149
  end
149
150
 
@@ -186,8 +187,8 @@ module Pry::Config::Behavior
186
187
  end
187
188
  end
188
189
 
189
- def respond_to_missing?(key, include_private=false)
190
- key?(key) or @default.respond_to?(key) or super(key, include_private)
190
+ def respond_to_missing?(key, include_all=false)
191
+ key?(key) or @default.respond_to?(key) or super(key, include_all)
191
192
  end
192
193
 
193
194
  private
@@ -1,8 +1,8 @@
1
1
  class Pry::Config::Default
2
2
  include Pry::Config::Behavior
3
- include Pry::Config::Lazy
3
+ include Pry::Config::Memoization
4
4
 
5
- lazy_implement({
5
+ def_memoized({
6
6
  input: proc {
7
7
  lazy_readline
8
8
  },
@@ -0,0 +1,44 @@
1
+ module Pry::Config::Memoization
2
+ MEMOIZED_METHODS = Hash.new {|h,k| h[k] = [] }
3
+
4
+ module ClassMethods
5
+ #
6
+ # Defines one or more methods who return a constant value after being
7
+ # called once.
8
+ #
9
+ # @example
10
+ # class Foo
11
+ # include Pry::Config::Memoization
12
+ # def_memoized({
13
+ # foo: proc {1+10},
14
+ # bar: proc{"aaa"<<"a"}
15
+ # })
16
+ # end
17
+ #
18
+ # @param [{String => Proc}] method_table
19
+ #
20
+ # @return [void]
21
+ #
22
+ def def_memoized(method_table)
23
+ method_table.each do |method_name, method|
24
+ define_method(method_name) do
25
+ method_table[method_name] = instance_eval(&method) if method_table[method_name].equal? method
26
+ method_table[method_name]
27
+ end
28
+ end
29
+ MEMOIZED_METHODS[self] |= method_table.keys
30
+ end
31
+ end
32
+
33
+ def self.included(mod)
34
+ mod.extend(ClassMethods)
35
+ end
36
+
37
+ #
38
+ # @return [Array<Symbol>]
39
+ # Returns the names of methods that have been defined by {ClassMethods#def_memoized}.
40
+ #
41
+ def memoized_methods
42
+ MEMOIZED_METHODS[self.class]
43
+ end
44
+ end
@@ -68,12 +68,22 @@ class Object
68
68
  def __binding__
69
69
  # If you ever feel like changing this method, be careful about variables
70
70
  # that you use. They shouldn't be inserted into the binding that will
71
- # eventually be returning.
71
+ # eventually be returned.
72
72
 
73
73
  # When you're cd'd into a class, methods you define should be added to it.
74
74
  if is_a?(Module)
75
+ # A special case, for JRuby.
76
+ # Module.new.class_eval("binding") has different behaviour than CRuby,
77
+ # where this is not needed: class_eval("binding") vs class_eval{binding}.
78
+ # Using a block works around the difference of behaviour on JRuby.
79
+ # The scope is clear of local variabless. Don't add any.
80
+ #
81
+ # This fixes the following two spec failures, at https://travis-ci.org/pry/pry/jobs/274470002
82
+ # 1) ./spec/pry_spec.rb:360:in `block in (root)'
83
+ # 2) ./spec/pry_spec.rb:366:in `block in (root)'
84
+ return class_eval {binding} if Pry::Helpers::BaseHelpers.jruby? and self.name == nil
75
85
  # class_eval sets both self and the default definee to this class.
76
- return class_eval "binding"
86
+ return class_eval("binding")
77
87
  end
78
88
 
79
89
  unless respond_to?(:__pry__)
@@ -0,0 +1,23 @@
1
+ class Pry
2
+ module Forwardable
3
+ require 'forwardable'
4
+ include ::Forwardable
5
+
6
+ #
7
+ # Since Ruby 2.4, Forwardable will print a warning when
8
+ # calling a method that is private on a delegate, and
9
+ # in the future it could be an error: https://bugs.ruby-lang.org/issues/12782#note-3
10
+ #
11
+ # That's why we revert to a custom implementation for delegating one
12
+ # private method to another.
13
+ #
14
+ def def_private_delegators(target, *private_delegates)
15
+ private_delegates.each do |private_delegate|
16
+ define_method(private_delegate) do |*a, &b|
17
+ instance_variable_get(target).__send__(private_delegate, *a, &b)
18
+ end
19
+ end
20
+ class_eval { private(*private_delegates) }
21
+ end
22
+ end
23
+ end
@@ -18,11 +18,11 @@ class Pry
18
18
 
19
19
  COLORS.each_pair do |color, value|
20
20
  define_method color do |text|
21
- "\001\033[0;#{30+value}m\002#{text}\001\033[0m\002"
21
+ "\033[0;#{30+value}m#{text}\033[0m"
22
22
  end
23
23
 
24
24
  define_method "bright_#{color}" do |text|
25
- "\001\033[1;#{30+value}m\002#{text}\001\033[0m\002"
25
+ "\033[1;#{30+value}m#{text}\033[0m"
26
26
  end
27
27
  end
28
28
 
@@ -98,3 +98,4 @@ class Pry
98
98
  end
99
99
  end
100
100
  end
101
+
@@ -167,26 +167,18 @@ class Pry::InputCompleter
167
167
  end
168
168
  else
169
169
  # func1.func2
170
- candidates = []
170
+ candidates = Set.new
171
+ to_ignore = ignored_modules
171
172
  ObjectSpace.each_object(Module){|m|
172
- begin
173
- name = m.name.to_s
174
- rescue Pry::RescuableException
175
- name = ""
176
- end
177
- next if name != "IRB::Context" and
178
- /^(IRB|SLex|RubyLex|RubyToken)/ =~ name
179
-
173
+ next if (to_ignore.include?(m) rescue true)
180
174
  # jruby doesn't always provide #instance_methods() on each
181
175
  # object.
182
176
  if m.respond_to?(:instance_methods)
183
- candidates.concat m.instance_methods(false).collect(&:to_s)
177
+ candidates.merge m.instance_methods(false).collect(&:to_s)
184
178
  end
185
179
  }
186
- candidates.sort!
187
- candidates.uniq!
188
180
  end
189
- select_message(path, receiver, message, candidates)
181
+ select_message(path, receiver, message, candidates.sort)
190
182
  when /^\.([^.]*)$/
191
183
  # Unknown(maybe String)
192
184
  receiver = ""
@@ -239,4 +231,30 @@ class Pry::InputCompleter
239
231
  end
240
232
  return path, input
241
233
  end
234
+
235
+ def ignored_modules
236
+ # We could cache the result, but IRB is not loaded by default.
237
+ # And this is very fast anyway.
238
+ # By using this approach, we avoid Module#name calls, which are
239
+ # relatively slow when there are a lot of anonymous modules defined.
240
+ s = Set.new
241
+
242
+ scanner = lambda do |m|
243
+ next if s.include?(m) # IRB::ExtendCommandBundle::EXCB recurses.
244
+ s << m
245
+ m.constants(false).each do |c|
246
+ value = m.const_get(c)
247
+ scanner.call(value) if value.is_a?(Module)
248
+ end
249
+ end
250
+
251
+ # FIXME: Add Pry here as well?
252
+ [:IRB, :SLex, :RubyLex, :RubyToken].each do |module_name|
253
+ next unless Object.const_defined?(module_name)
254
+ scanner.call(Object.const_get(module_name))
255
+ end
256
+
257
+ s.delete(IRB::Context) if defined?(IRB::Context)
258
+ s
259
+ end
242
260
  end
@@ -23,8 +23,8 @@ class Pry::LastException < BasicObject
23
23
  end
24
24
  end
25
25
 
26
- def respond_to_missing?(name, include_private = false)
27
- @e.respond_to?(name)
26
+ def respond_to_missing?(name, include_all=false)
27
+ @e.respond_to?(name, include_all)
28
28
  end
29
29
 
30
30
  #
@@ -461,8 +461,8 @@ class Pry
461
461
 
462
462
  # @param [String, Symbol] method_name
463
463
  # @return [Boolean]
464
- def respond_to?(method_name)
465
- super or @method.respond_to?(method_name)
464
+ def respond_to?(method_name, include_all=false)
465
+ super or @method.respond_to?(method_name, include_all)
466
466
  end
467
467
 
468
468
  # Delegate any unknown calls to the wrapped method.
@@ -35,8 +35,8 @@ class Pry::Output
35
35
  @boxed_io.__send__(name, *args, &block)
36
36
  end
37
37
 
38
- def respond_to_missing?(*a)
39
- @boxed_io.respond_to?(*a)
38
+ def respond_to_missing?(m, include_all=false)
39
+ @boxed_io.respond_to?(m, include_all)
40
40
  end
41
41
 
42
42
  def decolorize_maybe(str)
@@ -5,7 +5,7 @@ class Pry
5
5
  LOCAL_RC_FILE = "./.pryrc"
6
6
 
7
7
  class << self
8
- extend Forwardable
8
+ extend Pry::Forwardable
9
9
  attr_accessor :custom_completions
10
10
  attr_accessor :current_line
11
11
  attr_accessor :line_buffer
@@ -1,8 +1,6 @@
1
- require 'forwardable'
2
-
3
1
  class Pry
4
2
  class REPL
5
- extend Forwardable
3
+ extend Pry::Forwardable
6
4
  def_delegators :@pry, :input, :output
7
5
 
8
6
  # @return [Pry] The instance of {Pry} that the user is controlling.
@@ -332,7 +332,7 @@ class Pry::Slop
332
332
  # Override this method so we can check if an option? method exists.
333
333
  #
334
334
  # Returns true if this option key exists in our list of options.
335
- def respond_to_missing?(method_name, include_private = false)
335
+ def respond_to_missing?(method_name, include_all=false)
336
336
  options.any? { |o| o.key == method_name.to_s.chop } || super
337
337
  end
338
338
 
@@ -102,7 +102,7 @@ def pry_eval(*eval_strs)
102
102
  end
103
103
 
104
104
  class PryTester
105
- extend Forwardable
105
+ extend Pry::Forwardable
106
106
 
107
107
  attr_reader :pry, :out
108
108
 
@@ -1,3 +1,3 @@
1
1
  class Pry
2
- VERSION = "0.11.0.pre2"
2
+ VERSION = "0.11.0"
3
3
  end
@@ -150,8 +150,8 @@ class Pry
150
150
  wrapped.send(method_name, *args, &block)
151
151
  end
152
152
 
153
- def respond_to?(method_name)
154
- super || wrapped.respond_to?(method_name)
153
+ def respond_to?(method_name, include_all=false)
154
+ super || wrapped.respond_to?(method_name, include_all)
155
155
  end
156
156
 
157
157
  # Retrieve the source location of a module. Return value is in same
@@ -1,5 +1,4 @@
1
1
  require 'pry/helpers/documentation_helpers'
2
- require 'forwardable'
3
2
 
4
3
  class Pry
5
4
  class WrappedModule
@@ -10,7 +9,7 @@ class Pry
10
9
  class Candidate
11
10
  include Pry::Helpers::DocumentationHelpers
12
11
  include Pry::CodeObject::Helpers
13
- extend Forwardable
12
+ extend Pry::Forwardable
14
13
 
15
14
  # @return [String] The file where the module definition is located.
16
15
  attr_reader :file
@@ -22,15 +21,12 @@ class Pry
22
21
 
23
22
  # Methods to delegate to associated `Pry::WrappedModule
24
23
  # instance`.
25
- private_delegates = [:lines_for_file, :method_candidates,
26
- :yard_docs?]
27
-
28
- public_delegates = [:wrapped, :module?, :class?, :name, :nonblank_name,
24
+ private_delegates = [:lines_for_file, :method_candidates, :yard_docs?, :name]
25
+ public_delegates = [:wrapped, :module?, :class?, :nonblank_name,
29
26
  :number_of_candidates]
30
27
 
31
- def_delegators :@wrapper, *(private_delegates + public_delegates)
32
- private(*private_delegates)
33
- public(*public_delegates)
28
+ def_delegators :@wrapper, *public_delegates
29
+ def_private_delegators :@wrapper, *private_delegates
34
30
 
35
31
  # @raise [Pry::CommandError] If `rank` is out of bounds.
36
32
  # @param [Pry::WrappedModule] wrapper The associated
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0.pre2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mair (banisterfiend)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-11-02 00:00:00.000000000 Z
13
+ date: 2017-09-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coderay
@@ -158,10 +158,11 @@ files:
158
158
  - lib/pry/config/behavior.rb
159
159
  - lib/pry/config/convenience.rb
160
160
  - lib/pry/config/default.rb
161
- - lib/pry/config/lazy.rb
161
+ - lib/pry/config/memoization.rb
162
162
  - lib/pry/core_extensions.rb
163
163
  - lib/pry/editor.rb
164
164
  - lib/pry/exceptions.rb
165
+ - lib/pry/forwardable.rb
165
166
  - lib/pry/helpers.rb
166
167
  - lib/pry/helpers/base_helpers.rb
167
168
  - lib/pry/helpers/command_helpers.rb
@@ -216,12 +217,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
217
  version: 1.9.3
217
218
  required_rubygems_version: !ruby/object:Gem::Requirement
218
219
  requirements:
219
- - - ">"
220
+ - - ">="
220
221
  - !ruby/object:Gem::Version
221
- version: 1.3.1
222
+ version: '0'
222
223
  requirements: []
223
224
  rubyforge_project:
224
- rubygems_version: 2.5.1
225
+ rubygems_version: 2.6.12
225
226
  signing_key:
226
227
  specification_version: 4
227
228
  summary: An IRB alternative and runtime developer console
@@ -1,25 +0,0 @@
1
- module Pry::Config::Lazy
2
- LAZY_KEYS = Hash.new {|h,k| h[k] = [] }
3
-
4
- module ClassMethods
5
- def lazy_implement(method_name_to_func)
6
- method_name_to_func.each do |method_name, func|
7
- define_method(method_name) do
8
- if method_name_to_func[method_name].equal?(func)
9
- method_name_to_func[method_name] = instance_eval(&func)
10
- end
11
- method_name_to_func[method_name]
12
- end
13
- end
14
- LAZY_KEYS[self] |= method_name_to_func.keys
15
- end
16
- end
17
-
18
- def self.included(includer)
19
- includer.extend(ClassMethods)
20
- end
21
-
22
- def lazy_keys
23
- LAZY_KEYS[self.class]
24
- end
25
- end