pretty_debug 0.9.5 → 0.9.6
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/lib/pretty_debug.rb +11 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b62733654680aa8c5594aad5bceaf3fd99763d58
|
4
|
+
data.tar.gz: 260e715e380fbd9d6d3b006b76a55b69ce8ebd15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f2e705b0e1dfd43885a0a19d238bb80f2c15ea3e43185cd8145e248a8aabf40257da2c09c5f22a512ea25b516e8d6172cd3f9c876f66ce57ec2d5e43f08108d
|
7
|
+
data.tar.gz: a6b044cbc4f84a02045d8cb2de7467791f5ef72de8afd91e3708597b34aa3a6af695ec6036057df4d0ac6aef20d9697be4d002bc8c723e4e42b2826ccd634b6b
|
data/lib/pretty_debug.rb
CHANGED
@@ -168,8 +168,10 @@ class PrettyDebug
|
|
168
168
|
def self.beautify a
|
169
169
|
a
|
170
170
|
.map{|l| [l.realpath, l.lineno, l.label]}
|
171
|
-
.transpose.tap do
|
172
|
-
|
171
|
+
.transpose.tap do
|
172
|
+
|_, _, ms|
|
173
|
+
ms.map! do
|
174
|
+
|m|
|
173
175
|
case m
|
174
176
|
when *Hook then "(#{m})"
|
175
177
|
when /\A(rescue in )?block( .*)? in / then "(entered block)".freeze
|
@@ -192,7 +194,8 @@ PrettyDebug.format{|row| "#{row.join(" | ".freeze)} ".bg(:white).color(:black)}
|
|
192
194
|
class PrettyArray < Array
|
193
195
|
def initialize a
|
194
196
|
super(a)
|
195
|
-
reject!{
|
197
|
+
reject!{
|
198
|
+
|f, l, m|
|
196
199
|
f == __FILE__ or
|
197
200
|
m =~ /\A<.*>\z/ # Such as `<top (required)>`, `<module:Foo>`.
|
198
201
|
}
|
@@ -216,11 +219,11 @@ class Method; def inspect; "#{receiver}.#{name}" end end
|
|
216
219
|
class UnboundMethod; def inspect; "#{owner}##{name}" end end
|
217
220
|
|
218
221
|
class Object
|
219
|
-
def recursive?
|
222
|
+
def recursive? **; false end
|
220
223
|
end
|
221
224
|
|
222
225
|
module Enumerable
|
223
|
-
def recursive? known
|
226
|
+
def recursive? **known
|
224
227
|
return true if known.include?(self)
|
225
228
|
known[self] = true
|
226
229
|
begin
|
@@ -232,7 +235,7 @@ module Enumerable
|
|
232
235
|
end
|
233
236
|
|
234
237
|
class Range
|
235
|
-
def recursive?
|
238
|
+
def recursive? **; false end
|
236
239
|
end
|
237
240
|
|
238
241
|
class Array
|
@@ -293,7 +296,8 @@ end
|
|
293
296
|
|
294
297
|
class Array
|
295
298
|
def align ellipsis_limit = nil
|
296
|
-
transpose.map do
|
299
|
+
transpose.map do
|
300
|
+
|col|
|
297
301
|
just = case col.first; when Numeric then :rjust; else :ljust end
|
298
302
|
width = col.map{|cell| cell.to_s.length}.max
|
299
303
|
max = ellipsis_limit || width
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pretty_debug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05
|
11
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ''
|
14
14
|
email: []
|
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
36
36
|
version: '0'
|
37
37
|
requirements: []
|
38
38
|
rubyforge_project:
|
39
|
-
rubygems_version: 2.
|
39
|
+
rubygems_version: 2.4.1
|
40
40
|
signing_key:
|
41
41
|
specification_version: 4
|
42
42
|
summary: ''
|