pretty_debug 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pretty_debug.rb +6 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fb272c41cfb79879fc47872950a08010fb4d5ff
4
- data.tar.gz: c55eddf7946300fc4ad6f164524d4bd612927117
3
+ metadata.gz: 5b908f1252680196153024b01e285bdaeb79e253
4
+ data.tar.gz: d54330f760d904f84e18515d6edfdda65aa6577c
5
5
  SHA512:
6
- metadata.gz: 28e978bfde122dd795749c4d1ef49477e6626cfe186317447957dd9fd41708949e472c22a4780e4d76e6e8f929e8c880effd1a5d5acd791ebfa90aa5063d298d
7
- data.tar.gz: 7ad0a9de7afc645a1bc5eefaae184080925c266a5a84d6ed2d7e2601c1a9491e73d91443438c846b32414fa44d4223bebc57aaf3326b385aa00417ae20b1dabd
6
+ metadata.gz: c31bc889af761891d8041170f5daa52c33faeeac225bd3094af376308377e3698065204fc841ebd04289f83f4d2889f5ffae805a909fbc1c7e03924b3ef4c662
7
+ data.tar.gz: eb408d027056deb394af766960333f8e166d8324cb05007cf2458dcad2715bc1800327b8a8e32bff097d4d29b818692d9fc57c18c0cd2ba1dcb9d950af164458
data/lib/pretty_debug.rb CHANGED
@@ -24,17 +24,18 @@ end
24
24
  class Object
25
25
  def intercept
26
26
  l = caller_location
27
- tap do |x| puts \
27
+ tap do puts \
28
28
  "[Debug] #{"#{l.path}:#{l.lineno}"}".bf.color(:yellow),
29
- x.inspect.verbatim
29
+ inspect.verbatim
30
30
  end
31
31
  end
32
32
  def which m
33
33
  l = caller_location
34
34
  m = :method_missing unless self.class.method_defined?(m)
35
- tap do |x| puts \
35
+ mt = method(m)
36
+ tap do puts \
36
37
  "[Debug] #{"#{l.path}:#{l.lineno}"}".bf.color(:yellow),
37
- "#{x.class}##{m}@#{x.method(m).source_location.to_a.join(":")}"
38
+ "#{self.class}(#{mt.owner})##{m}@#{mt.source_location.to_a.join(":")}"
38
39
  end
39
40
  end
40
41
  end
@@ -45,7 +46,7 @@ module Kernel
45
46
  when *klass
46
47
  else
47
48
  ArgumentError.raise(
48
- "#{pr.call + " " if pr}should be #{klass.map(&:expand).join(", ")} instance"\
49
+ "#{pr.call + " " if pr}should be #{klass.map(&:expand).join(", ")} instance "\
49
50
  "but is #{v.expand}")
50
51
  end
51
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretty_debug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawa