stack_trace 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 +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -1
- data/ext/stack_trace/trace.c +8 -3
- data/lib/stack_trace/version.rb +1 -1
- data/lib/stack_trace.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac9e909692657f9e1b0cd9fc6475faf494458954513aa2e659e9faeacfb3d51b
|
4
|
+
data.tar.gz: d4819f5e40ef2d81cc5cc539247916ed16416eed9400f63007fe85edc8c9c4cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 072443043f5910dfd02ded927653a23abacefede4f17fd87155521275818b0b90aa769544c30e9f06b5c46c24193e9bac12f711ae39c4f887340d435402f40c2
|
7
|
+
data.tar.gz: d3a5c0ae3803776ea0ad504c825c75ca0d9a70d5153a22133f809633631f824a7540fe7dd72c76c9e4eece214bb578d04765445f39089adadc6076abbe7af10a
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
data/ext/stack_trace/trace.c
CHANGED
@@ -20,7 +20,8 @@ void free_trace(Trace *trace) {
|
|
20
20
|
}
|
21
21
|
|
22
22
|
void process_obsolote_event(Event *event) {
|
23
|
-
//
|
23
|
+
// Free this trace as there is no reference to it anymore!
|
24
|
+
free_trace(event->trace);
|
24
25
|
}
|
25
26
|
|
26
27
|
void set_check_proc(VALUE proc) {
|
@@ -118,10 +119,14 @@ VALUE to_ruby_hash(Trace *trace) {
|
|
118
119
|
}
|
119
120
|
|
120
121
|
VALUE rb_get_current_trace(VALUE _self) {
|
122
|
+
VALUE main_module = rb_const_get(rb_cObject, rb_intern("StackTrace"));
|
123
|
+
VALUE tracePoint = rb_iv_get(main_module, "@trace_point");
|
124
|
+
VALUE is_tracepoint_enabled = rb_funcall(tracePoint, rb_intern("enabled?"), 0);
|
125
|
+
|
126
|
+
if(RTEST(is_tracepoint_enabled)) rb_raise(rb_eRuntimeError, "Trace is active!");
|
127
|
+
|
121
128
|
Trace *trace = get_current_trace_without_gvl();
|
122
129
|
VALUE ruby_hash = to_ruby_hash(trace);
|
123
130
|
|
124
|
-
free_trace(trace);
|
125
|
-
|
126
131
|
return ruby_hash;
|
127
132
|
}
|
data/lib/stack_trace/version.rb
CHANGED
data/lib/stack_trace.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_trace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Emin INAC
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: StackTrace
|
14
14
|
email:
|