iseq_collector 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/lib/iseq_collector.rb +3 -5
- data/lib/iseq_collector/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 77a9701b2698c7315238b355e01c33c036393aadf61f5232c6a628d5e112631e
|
4
|
+
data.tar.gz: 1a7e5dccd0c29f2b51a4ed4043a388d429139307234e7596abe3b06a4e3a20e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 641af88a3e959fac9c0713e03aa59dbc8b735d59a24d38e947ead7835ae4876a2fb43492bc96e63d2e5423f1d69af2c6973efd983687b2f6fff0e7c7d45f3355
|
7
|
+
data.tar.gz: e03a154dea16979fe0d061f407599e15003d68e8c48bceded7218ff5a9e5bc96bc8adb1a42801de2c9a89e00c644ce5021d866845d373cd7f25bbb9dfb11402e
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ This gem introduce several methdos to `ObjectSpace` to operate all of iseq objec
|
|
7
7
|
Ruby (MRI) 2.2 and erlier, all of bytecode (iseq: instruction sequence) are `RubyVM::InstructionSequence` objects and we can touch them with `ObjectSpace.each_object` method.
|
8
8
|
However Ruby 2.3 and later does not expose iseqs by `RubyVM::InstructionSequence`. You need to use `RubyVM::InstructionSequence.of(proc or method object)` to get `RubyVM::InstructionSequence` and it is impossible to get all of iseqs in a process.
|
9
9
|
|
10
|
-
This gem provides `ObjectSpace.each_iseq`, `ObjectSpace.count_iseq` and `ObjectSpace.memsize_of_all_iseq` to get all of iseqs in a process for Ruby 2.3
|
10
|
+
This gem provides `ObjectSpace.each_iseq`, `ObjectSpace.count_iseq` and `ObjectSpace.memsize_of_all_iseq` to get all of iseqs in a process for Ruby 2.3 and later. Future Ruby version can provide same purpose API, but not sure.
|
11
11
|
|
12
12
|
## Installation
|
13
13
|
|
data/lib/iseq_collector.rb
CHANGED
@@ -17,12 +17,10 @@ when RUBY_VERSION < '2.3.0'
|
|
17
17
|
cnt
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
|
+
when RUBY_VERSION >= '2.3.0' && !ObjectSpace.respond_to?(:count_iseq)
|
21
22
|
require_relative 'iseq_collector.so'
|
22
|
-
|
23
|
-
unless ObjectSpace.respond_to? :count_iseq
|
24
|
-
require_relative 'iseq_collector.so'
|
25
|
-
end
|
23
|
+
else
|
26
24
|
# do nothing.
|
27
25
|
end
|
28
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iseq_collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi Sasada
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -106,8 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
|
-
|
110
|
-
rubygems_version: 2.6.11
|
109
|
+
rubygems_version: 3.0.0.beta3
|
111
110
|
signing_key:
|
112
111
|
specification_version: 4
|
113
112
|
summary: ISeq collector for MRI 2.3 and 2.4
|