overrider 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c417392909ef2a0f683cc5e2b13f217383eb6219d82b98f2e4dcbb02960b40ac
4
- data.tar.gz: 855689641cc3992f9da0e65abd3efa8c4353ce1fb9f7d9d39a41484f85704339
3
+ metadata.gz: 3f5f6427ceb87b0ec35bc2cd671ee20adec487cec6d5b360194ef010700fe8b7
4
+ data.tar.gz: f060e48860d1e11560fefb8e7008b16d99e7c44d11389802b6004243aacd399b
5
5
  SHA512:
6
- metadata.gz: e1b7030c31d7c823f2bfcbe02781271bb882f2cf9b631e3e9ae50560c00e981f155a003e9188bb09142f4f3d87ec29b2c61a53c352768cffb6ce09742e22b911
7
- data.tar.gz: 95e5d9d96127c4160cec6c8d55aa3968da975a6051ebdae93a12a36ec08c4078abd99cfaca324721fe77943ac0999d2b869499764ac1129015ce5f1c48d59b12
6
+ metadata.gz: f8ed5bf14feef878b73f1be4153badae266baed307def1c95440092dc2120df56e3bbc45dd4de47fa3bb805effb67aa7998b554f5c5cd5a02318b7611079e5f7
7
+ data.tar.gz: 05a8c4c1dc1c2b7e91ba36a3b0f134a879dec3d688940fae35aea12e5f3e7119ff1fedfd47a60335a56a8e76da87f4b9fe55fa336fdc7669ef78c6e924725992
data/README.md CHANGED
@@ -53,8 +53,8 @@ end # => raise
53
53
  ```
54
54
 
55
55
  ### for Production
56
- If you want to disable Abstriker, write `Abstriker.disable = true` at first line.
57
- If Abstriker is disabled, TracePoint never runs, and so there is no overhead of VM instruction.
56
+ If you want to disable Overrider, write `Overrider.disable = true` at first line.
57
+ If Overrider is disabled, TracePoint never runs, and so there is no overhead of VM instruction.
58
58
 
59
59
  ### Caution
60
60
 
@@ -31,11 +31,13 @@ module Overrider
31
31
  using Module.new {
32
32
  refine Module do
33
33
  def detect_event_type
34
- caller_info = caller_locations(2, 1)[0]
35
- if caller_info.label.match?(/block/)
36
- [:b_call, :b_return, :raise]
37
- else
34
+ caller_info = caller_locations(2, 2)[0]
35
+ if caller_info.label.match?(/<class/) || caller_info.label.match?(/<module/)
36
+ [:end, :raise]
37
+ elsif caller_info.label.match?(/singleton class/)
38
38
  [:end, :raise]
39
+ else
40
+ [:b_call, :b_return, :raise]
39
41
  end
40
42
  end
41
43
  end
@@ -1,3 +1,3 @@
1
1
  module Overrider
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overrider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-25 00:00:00.000000000 Z
11
+ date: 2018-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler