pretty_debug 0.8.14 → 0.9.0
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 +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 073199514254a6169a0c65a8622b66c5e604100b
|
4
|
+
data.tar.gz: 651656e2be6db67e3d026d71302eb5aa427637f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63df9cc0f95ce02e1fd6b79cf0c47c197d213922de0fd28c8a2444d7b834f31148333e69e37388cac9d23cb4f27212a1aab1225168d35e4f7f54542fb3c1ad82
|
7
|
+
data.tar.gz: ef3b7eea62482aefab4384ab1af29463261cb4103436bbb8fab4bc6dea9c1cf19d50d8b0dfb610fe31b83b29f0a4192d2798886d141106f82c2ee85ee480ca19
|
data/lib/pretty_debug.rb
CHANGED
@@ -41,7 +41,7 @@ class Object
|
|
41
41
|
end
|
42
42
|
|
43
43
|
module Kernel
|
44
|
-
def class_check
|
44
|
+
def class_check *klass, v, &pr
|
45
45
|
case v
|
46
46
|
when *klass
|
47
47
|
else
|
@@ -290,7 +290,7 @@ class Array
|
|
290
290
|
end.transpose
|
291
291
|
end
|
292
292
|
def common_prefix
|
293
|
-
each{|e| class_check(
|
293
|
+
each{|e| class_check(String, e){"All elements must be a String".freeze}}
|
294
294
|
first, *others = self
|
295
295
|
i = 0
|
296
296
|
loop{break unless first[i] and others.all?{|s| first[i] == s[i]}; i += 1}
|
@@ -299,7 +299,7 @@ class Array
|
|
299
299
|
## first[0, (0...first.length).find{|i| first[i].! or others.any?{|s| first[i] != s[i]}}.to_i]
|
300
300
|
end
|
301
301
|
def common_affix
|
302
|
-
each{|e| class_check(
|
302
|
+
each{|e| class_check(String, e){"All elements must be a String".freeze}}
|
303
303
|
first, *others = self
|
304
304
|
i = - 1
|
305
305
|
loop{break unless first[i] and others.all?{|s| first[i] == s[i]}; i -= 1}
|
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.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ''
|
14
14
|
email: []
|