pry 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/pry/commands/ls/constants.rb +2 -1
- data/lib/pry/commands/ls/globals.rb +2 -2
- data/lib/pry/commands/ls/instance_vars.rb +2 -0
- data/lib/pry/commands/ls/local_vars.rb +2 -1
- data/lib/pry/commands/ls/ls_entity.rb +1 -1
- data/lib/pry/editor.rb +1 -1
- data/lib/pry/helpers/base_helpers.rb +4 -2
- data/lib/pry/pager.rb +5 -4
- data/lib/pry/pry_instance.rb +3 -7
- data/lib/pry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ebc92a4517dfa140377a064c75d144477159656148a4370c924ecbacf97155a
|
|
4
|
+
data.tar.gz: ac296d197af25cc2e5635d5fba84e92133abcab28d891d88441c498539fd4707
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fcbc19a8e8c9d3d7f93f80a4cc8b42cf1074843355f9e1c0145e3d5ac18e8b9f8e2ad095ef94db193bf5fc47c904bf89848863cc4a81fce8339097023765cdfc
|
|
7
|
+
data.tar.gz: 0156ac2559648e20e71c51c066176f1649d5b27e2689246f6c2b8985ea0fc5a1c8830ef787a6bf235e7e679fd380913f8e85e5a1d00572260fd36979b99c9ff4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
### [v0.16.1](v0.16.1) (October 19, 2026)
|
|
2
|
+
|
|
3
|
+
#### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* Fix `ls -G` grep filtering across all variable types
|
|
6
|
+
([#2363](https://github.com/pry/pry/pull/2363))
|
|
7
|
+
* Fix Readline call on Ruby 4+ with SimplePager
|
|
8
|
+
([#2366](https://github.com/pry/pry/pull/2366))
|
|
9
|
+
([#2373](https://github.com/pry/pry/pull/2373))
|
|
10
|
+
* Fix test failures when `TERM` and `EDITOR` are unset
|
|
11
|
+
([#2367](https://github.com/pry/pry/pull/2367))
|
|
12
|
+
|
|
1
13
|
### [v0.16.0](v0.16.0) (December 26, 2025)
|
|
2
14
|
|
|
3
15
|
#### Features
|
|
@@ -27,7 +27,8 @@ class Pry
|
|
|
27
27
|
def output_self
|
|
28
28
|
mod = interrogatee_mod
|
|
29
29
|
constants = WrappedModule.new(mod).constants(@verbose_switch)
|
|
30
|
-
|
|
30
|
+
constants = grep.regexp[constants]
|
|
31
|
+
output_section('constants', format(mod, constants))
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
private
|
|
@@ -27,8 +27,8 @@ class Pry
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def output_self
|
|
30
|
-
|
|
31
|
-
output_section('global variables',
|
|
30
|
+
globals = grep.regexp[@target.eval('global_variables')]
|
|
31
|
+
output_section('global variables', format(globals))
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
private
|
|
@@ -24,6 +24,8 @@ class Pry
|
|
|
24
24
|
[] # TODO: BasicObject support
|
|
25
25
|
end
|
|
26
26
|
kvars = Pry::Method.safe_send(interrogatee_mod, :class_variables)
|
|
27
|
+
ivars = grep.regexp[ivars]
|
|
28
|
+
kvars = grep.regexp[kvars]
|
|
27
29
|
ivars_out = output_section('instance variables', format(:instance_var, ivars))
|
|
28
30
|
kvars_out = output_section('class variables', format(:class_var, kvars))
|
|
29
31
|
ivars_out + kvars_out
|
|
@@ -14,6 +14,7 @@ class Pry
|
|
|
14
14
|
locals = @target.eval('local_variables').reject do |e|
|
|
15
15
|
@sticky_locals.key?(e.to_sym)
|
|
16
16
|
end
|
|
17
|
+
locals = grep.regexp[locals]
|
|
17
18
|
name_value_pairs = locals.map do |name|
|
|
18
19
|
[name, @target.eval(name.to_s)]
|
|
19
20
|
end
|
|
@@ -37,7 +38,7 @@ class Pry
|
|
|
37
38
|
pad = desired_width + color_escape_padding
|
|
38
39
|
Kernel.format(
|
|
39
40
|
"%-#{pad}<name>s = %<value>s",
|
|
40
|
-
name:
|
|
41
|
+
name: colorized_lhs,
|
|
41
42
|
value: rhs
|
|
42
43
|
)
|
|
43
44
|
end
|
data/lib/pry/editor.rb
CHANGED
|
@@ -36,8 +36,10 @@ class Pry
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def use_ansi_codes?
|
|
39
|
-
Pry::Helpers::Platform.windows_ansi?
|
|
40
|
-
|
|
39
|
+
return true if Pry::Helpers::Platform.windows_ansi?
|
|
40
|
+
|
|
41
|
+
term = Pry::Env['TERM']
|
|
42
|
+
!term.nil? && term != "dumb"
|
|
41
43
|
end
|
|
42
44
|
|
|
43
45
|
def colorize_code(code)
|
data/lib/pry/pager.rb
CHANGED
|
@@ -57,7 +57,7 @@ class Pry
|
|
|
57
57
|
if !pry_instance.config.pager
|
|
58
58
|
NullPager.new(pry_instance.output)
|
|
59
59
|
elsif !SystemPager.available? || Helpers::Platform.jruby?
|
|
60
|
-
SimplePager.new(pry_instance.output)
|
|
60
|
+
SimplePager.new(pry_instance.output, pry_instance.input)
|
|
61
61
|
else
|
|
62
62
|
SystemPager.new(pry_instance.output)
|
|
63
63
|
end
|
|
@@ -99,8 +99,9 @@ class Pry
|
|
|
99
99
|
# `SimplePager` is a straightforward pure-Ruby pager. We use it on
|
|
100
100
|
# JRuby and when we can't find a usable external pager.
|
|
101
101
|
class SimplePager < NullPager
|
|
102
|
-
def initialize(
|
|
103
|
-
super
|
|
102
|
+
def initialize(out, input = Pry.config.input)
|
|
103
|
+
super(out)
|
|
104
|
+
@input = input
|
|
104
105
|
@tracker = PageTracker.new(height - 3, width)
|
|
105
106
|
end
|
|
106
107
|
|
|
@@ -115,7 +116,7 @@ class Pry
|
|
|
115
116
|
@out.print "\e[0m"
|
|
116
117
|
@out.print "<page break> --- Press enter to continue " \
|
|
117
118
|
"( q<enter> to break ) --- <page break>\n"
|
|
118
|
-
raise StopPaging if
|
|
119
|
+
raise StopPaging if @input.readline("").chomp == "q"
|
|
119
120
|
|
|
120
121
|
@tracker.reset
|
|
121
122
|
end
|
data/lib/pry/pry_instance.rb
CHANGED
|
@@ -49,10 +49,10 @@ class Pry
|
|
|
49
49
|
attr_reader :config
|
|
50
50
|
|
|
51
51
|
def_delegators(
|
|
52
|
-
:@config, :input, :input=, :output
|
|
52
|
+
:@config, :input, :input=, :output=, :commands,
|
|
53
53
|
:commands=, :print, :print=, :exception_handler, :exception_handler=,
|
|
54
|
-
:hooks, :hooks=, :color, :color=, :pager
|
|
55
|
-
:
|
|
54
|
+
:hooks, :hooks=, :color, :color=, :pager=, :editor, :editor=,
|
|
55
|
+
:extra_sticky_locals, :extra_sticky_locals=
|
|
56
56
|
)
|
|
57
57
|
|
|
58
58
|
EMPTY_COMPLETIONS = [].freeze
|
|
@@ -182,14 +182,12 @@ class Pry
|
|
|
182
182
|
end
|
|
183
183
|
end
|
|
184
184
|
|
|
185
|
-
undef :memory_size if method_defined? :memory_size
|
|
186
185
|
# @return [Integer] The maximum amount of objects remembered by the inp and
|
|
187
186
|
# out arrays. Defaults to 100.
|
|
188
187
|
def memory_size
|
|
189
188
|
@output_ring.max_size
|
|
190
189
|
end
|
|
191
190
|
|
|
192
|
-
undef :memory_size= if method_defined? :memory_size=
|
|
193
191
|
def memory_size=(size)
|
|
194
192
|
@input_ring = Pry::Ring.new(size)
|
|
195
193
|
@output_ring = Pry::Ring.new(size)
|
|
@@ -493,7 +491,6 @@ class Pry
|
|
|
493
491
|
prompt_stack.size > 1 ? prompt_stack.pop : prompt
|
|
494
492
|
end
|
|
495
493
|
|
|
496
|
-
undef :pager if method_defined? :pager
|
|
497
494
|
# Returns the currently configured pager
|
|
498
495
|
# @example
|
|
499
496
|
# pry_instance.pager.page text
|
|
@@ -501,7 +498,6 @@ class Pry
|
|
|
501
498
|
Pry::Pager.new(self)
|
|
502
499
|
end
|
|
503
500
|
|
|
504
|
-
undef :output if method_defined? :output
|
|
505
501
|
# Returns an output device
|
|
506
502
|
# @example
|
|
507
503
|
# pry_instance.output.puts "ohai!"
|
data/lib/pry/version.rb
CHANGED
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.16.
|
|
4
|
+
version: 0.16.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Mair (banisterfiend)
|
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
229
229
|
- !ruby/object:Gem::Version
|
|
230
230
|
version: '0'
|
|
231
231
|
requirements: []
|
|
232
|
-
rubygems_version: 4.0.
|
|
232
|
+
rubygems_version: 4.0.6
|
|
233
233
|
specification_version: 4
|
|
234
234
|
summary: A runtime developer console and IRB alternative with powerful introspection
|
|
235
235
|
capabilities.
|