power_assert 0.3.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca399789200505cc381792aa1953ff3080e0263d
4
- data.tar.gz: 0ca2eca0a18cf8730baca78482d8bcb423477ec1
3
+ metadata.gz: e75d0a3ce99d4b13a7a459ae5b82ecb25622ced9
4
+ data.tar.gz: 5cf4b3586a8f34c71a784c61f87f978bc3969d04
5
5
  SHA512:
6
- metadata.gz: 4166d468bc99599f1dfd6318276a70d7014bed4e275b6172f52883bf1ad1bbe20986d692688618b482a42b52f8ac085ee12eb9246be7b777577a3652e2fb17dd
7
- data.tar.gz: 3625046283d993627f849bf3a78c6b5a1d502a9621382aa761202583643688c865a12d05d7c964ab819dc425db50747a15c6f4adb47b4ae4aea4e42351bcd39c
6
+ metadata.gz: 3d5ddce14b64265f9ff11e301f36d0ba686fca762370acfd9c8002fe1eb5c31de83f7f53b428877a6867ea06f3f55653b2f2cbff41ec42e3c8b71ea9625d8fbd
7
+ data.tar.gz: 3ea2c9ed78088200757930e92ef079c8d20aaae02ffaf9ffcb2b940a6eada78811363df8b35a827aa2ded501788805ad02a16c451dfa22bf6732865a2c551e7f
@@ -1,7 +1,7 @@
1
1
  # Yhpg
2
2
  # https://gist.github.com/yancya/37d79e02a91afcfdeed1
3
3
  #
4
- # Auhtor: yancya
4
+ # Author: yancya
5
5
 
6
6
  require_relative 'helper'
7
7
 
data/lib/power_assert.rb CHANGED
@@ -136,11 +136,9 @@ module PowerAssert
136
136
  tp.event == :return &&
137
137
  tp.binding.eval('::Kernel.__callee__')) || tp.method_id
138
138
  next if method_ids and ! method_ids[method_id]
139
+ next if tp.event == :c_return and
140
+ not (lineno == tp.lineno and path == tp.path)
139
141
  next unless tp.binding # workaround for ruby 2.2
140
- if tp.event == :c_return
141
- loc = tp.binding.eval('[__LINE__, __FILE__]')
142
- next unless lineno == loc[0] and path == loc[1]
143
- end
144
142
  locs = tp.binding.eval('::Kernel.caller_locations')
145
143
  current_diff = locs.length - @base_caller_length
146
144
  if current_diff <= TARGET_CALLER_DIFF[tp.event] and Thread.current == target_thread
@@ -1,3 +1,3 @@
1
1
  module PowerAssert
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power_assert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuki Tsujimoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-03 00:00:00.000000000 Z
11
+ date: 2016-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit