better_caller 0.0.1 → 0.1.2
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 +7 -0
- data/.document +5 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +20 -0
- data/{LICENSE → LICENSE.txt} +1 -1
- data/README.textile +71 -0
- data/Rakefile +36 -0
- data/VERSION +1 -0
- data/better_caller.gemspec +94 -0
- data/ext/better_caller.c +3 -44
- data/ext/debug.h +1 -1
- data/ext/dln.h +3 -3
- data/ext/encdb.h +18 -2
- data/ext/eval_intern.h +23 -6
- data/ext/extconf.rb +1 -0
- data/ext/gc.h +6 -4
- data/ext/id.h +25 -18
- data/ext/iseq.h +10 -9
- data/ext/method.h +103 -0
- data/ext/node.h +14 -47
- data/ext/parse.h +12 -14
- data/ext/regenc.h +7 -3
- data/ext/regint.h +16 -17
- data/ext/regparse.h +4 -1
- data/ext/revision.h +1 -1
- data/ext/thread_pthread.h +4 -1
- data/ext/thread_win32.h +1 -1
- data/ext/timev.h +21 -0
- data/ext/transcode_data.h +17 -14
- data/ext/transdb.h +32 -0
- data/ext/version.h +17 -17
- data/ext/vm_core.h +105 -45
- data/ext/vm_insnhelper.h +26 -14
- data/ext/vm_opts.h +1 -1
- data/lib/better_caller/extensions.rb +14 -0
- metadata +103 -53
- data/README.rdoc +0 -69
- data/spec/better_caller_spec.rb +0 -7
- data/spec/spec_helper.rb +0 -8
metadata
CHANGED
|
@@ -1,38 +1,88 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: better_caller
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
|
-
authors:
|
|
6
|
+
authors:
|
|
7
7
|
- Tim Morgan
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
date: 2011-01-04 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: bundler
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 1.0.0
|
|
19
|
+
type: :development
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 1.0.0
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: jeweler
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 1.5.2
|
|
33
|
+
type: :development
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: 1.5.2
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: yard
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 0.6.0
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 0.6.0
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: RedCloth
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '0'
|
|
17
61
|
type: :development
|
|
18
|
-
|
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
20
|
-
requirements:
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
21
65
|
- - ">="
|
|
22
|
-
- !ruby/object:Gem::Version
|
|
23
|
-
version:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
email:
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '0'
|
|
68
|
+
description: 'A more programmer-friendly call stack complete with bindings for each
|
|
69
|
+
level: no more string parsing!'
|
|
70
|
+
email: git@timothymorgan.info
|
|
27
71
|
executables: []
|
|
28
|
-
|
|
29
|
-
extensions:
|
|
72
|
+
extensions:
|
|
30
73
|
- ext/extconf.rb
|
|
31
|
-
extra_rdoc_files:
|
|
32
|
-
- LICENSE
|
|
33
|
-
- README.
|
|
34
|
-
files:
|
|
35
|
-
-
|
|
74
|
+
extra_rdoc_files:
|
|
75
|
+
- LICENSE.txt
|
|
76
|
+
- README.textile
|
|
77
|
+
files:
|
|
78
|
+
- ".document"
|
|
79
|
+
- Gemfile
|
|
80
|
+
- Gemfile.lock
|
|
81
|
+
- LICENSE.txt
|
|
82
|
+
- README.textile
|
|
83
|
+
- Rakefile
|
|
84
|
+
- VERSION
|
|
85
|
+
- better_caller.gemspec
|
|
36
86
|
- ext/better_caller.c
|
|
37
87
|
- ext/debug.h
|
|
38
88
|
- ext/dln.h
|
|
@@ -42,6 +92,7 @@ files:
|
|
|
42
92
|
- ext/gc.h
|
|
43
93
|
- ext/id.h
|
|
44
94
|
- ext/iseq.h
|
|
95
|
+
- ext/method.h
|
|
45
96
|
- ext/node.h
|
|
46
97
|
- ext/parse.h
|
|
47
98
|
- ext/regenc.h
|
|
@@ -50,6 +101,7 @@ files:
|
|
|
50
101
|
- ext/revision.h
|
|
51
102
|
- ext/thread_pthread.h
|
|
52
103
|
- ext/thread_win32.h
|
|
104
|
+
- ext/timev.h
|
|
53
105
|
- ext/transcode_data.h
|
|
54
106
|
- ext/transdb.h
|
|
55
107
|
- ext/version.h
|
|
@@ -57,37 +109,35 @@ files:
|
|
|
57
109
|
- ext/vm_exec.h
|
|
58
110
|
- ext/vm_insnhelper.h
|
|
59
111
|
- ext/vm_opts.h
|
|
60
|
-
-
|
|
61
|
-
- spec/spec_helper.rb
|
|
62
|
-
- LICENSE
|
|
63
|
-
has_rdoc: true
|
|
112
|
+
- lib/better_caller/extensions.rb
|
|
64
113
|
homepage: http://github.com/RISCfuture/better_caller
|
|
65
|
-
licenses:
|
|
114
|
+
licenses:
|
|
115
|
+
- MIT
|
|
116
|
+
metadata: {}
|
|
117
|
+
post_install_message: |2+
|
|
118
|
+
|
|
119
|
+
⚠️ DEPRECATED: better_caller is no longer maintained.
|
|
120
|
+
|
|
121
|
+
Ruby's modern `caller_locations` builtin (added in 2.0) covers most use cases.
|
|
66
122
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
require_paths:
|
|
123
|
+
This is the final release. No further updates are planned.
|
|
124
|
+
|
|
125
|
+
rdoc_options: []
|
|
126
|
+
require_paths:
|
|
71
127
|
- lib
|
|
72
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
|
-
requirements:
|
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
|
+
requirements:
|
|
74
130
|
- - ">="
|
|
75
|
-
- !ruby/object:Gem::Version
|
|
76
|
-
version:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
requirements:
|
|
131
|
+
- !ruby/object:Gem::Version
|
|
132
|
+
version: '0'
|
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
80
135
|
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
83
|
-
version:
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '0'
|
|
84
138
|
requirements: []
|
|
85
|
-
|
|
86
|
-
rubyforge_project: better_caller
|
|
87
|
-
rubygems_version: 1.3.5
|
|
88
|
-
signing_key:
|
|
139
|
+
rubygems_version: 4.0.11
|
|
89
140
|
specification_version: 3
|
|
90
|
-
summary: Symbolic call stack with bindings
|
|
91
|
-
test_files:
|
|
92
|
-
|
|
93
|
-
- spec/spec_helper.rb
|
|
141
|
+
summary: "[DEPRECATED] Symbolic call stack with bindings"
|
|
142
|
+
test_files: []
|
|
143
|
+
...
|
data/README.rdoc
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
= better_caller
|
|
2
|
-
|
|
3
|
-
Author:: Tim Morgan
|
|
4
|
-
Date:: Dec 23, 2009
|
|
5
|
-
License:: Released under the same terms as Ruby.
|
|
6
|
-
|
|
7
|
-
== Introduction by example
|
|
8
|
-
|
|
9
|
-
Actions speak louder than words. Gone are the days of this old suckageness:
|
|
10
|
-
|
|
11
|
-
caller #=> ["test.rb:8:in `foo'", "test.rb:16:in `<main>'"]
|
|
12
|
-
|
|
13
|
-
With better_caller, you get this new hotness:
|
|
14
|
-
|
|
15
|
-
require 'better_caller'
|
|
16
|
-
better_caller #=> [["test.rb", 8, :foo, #<Binding:0x000001010cae50>], ["test.rb", 16, :"<main>", #<Binding:0x000001010caef8>]]
|
|
17
|
-
|
|
18
|
-
There are a couple of things you may notice. First of all, the okay-that's-nice
|
|
19
|
-
thing: String parsing is a thing of the past. You get the file, line, and method
|
|
20
|
-
as separate elements. This happens <b>at the Ruby interpreter level</b>.
|
|
21
|
-
|
|
22
|
-
Now, the holy-shit-that's-awesome feature: <b>You get Bindings, all the way up
|
|
23
|
-
the stack.</b> Yes, that's right, you can do this:
|
|
24
|
-
|
|
25
|
-
eval "local_variables", better_caller.first.last #=> [ :var1, :var2, :foo ]
|
|
26
|
-
|
|
27
|
-
You also get this stuff in exception, mondo excellent for debugging:
|
|
28
|
-
|
|
29
|
-
$!.better_backtrace # now you can figure out what your local variables were at the time of the exception!
|
|
30
|
-
|
|
31
|
-
== This is horribly slow, right? You're using some +set_trace_func+ magic that's going to make my Ruby 1,000,000% slower, right?
|
|
32
|
-
|
|
33
|
-
No. better_caller is a C function that uses the internal Ruby memory structures
|
|
34
|
-
to build its output. Absolutely no +set_trace_func+ and no speed hit.
|
|
35
|
-
|
|
36
|
-
== Super ominous alpha warning
|
|
37
|
-
|
|
38
|
-
better_caller is extremely, hyperbolically alpha right now. Here are some known
|
|
39
|
-
obstacles currently preventing it from blowing minds:
|
|
40
|
-
|
|
41
|
-
* <b>It only works with a very specific version of Ruby (in particular,
|
|
42
|
-
1.9.1p376).</b> This is because it uses some private Ruby C functions to work
|
|
43
|
-
its magic, so it keeps a copy of some header files that you're not really
|
|
44
|
-
supposed to be using.
|
|
45
|
-
* <b>It causes "invalid dfp" crashes sometimes.</b> Every so often, for reasons
|
|
46
|
-
I _really_ wish I understood, the Ruby interpreter will come down in a ball of
|
|
47
|
-
fire after regurgitating "invalid dfp" to your console. DFP's and CFP's are
|
|
48
|
-
still pretty much witch-voodoo to me so I'm having a very hard time debugging
|
|
49
|
-
this problem.
|
|
50
|
-
|
|
51
|
-
Despite that, it does work sometimes, and when it does, I think it rocks. If you
|
|
52
|
-
do too, please do me the honor of contributing to this project, _especially_ if
|
|
53
|
-
you're one of the three people on the planet that understand the workings of
|
|
54
|
-
Ruby frame pointers. That would be swell.
|
|
55
|
-
|
|
56
|
-
=== Additional to-do items
|
|
57
|
-
|
|
58
|
-
* Comments
|
|
59
|
-
* Specs
|
|
60
|
-
|
|
61
|
-
== Release History
|
|
62
|
-
|
|
63
|
-
<b>0.0.1</b> (Dec 23, 2009)
|
|
64
|
-
|
|
65
|
-
* First public release.
|
|
66
|
-
|
|
67
|
-
== Copyright
|
|
68
|
-
|
|
69
|
-
See LICENSE for copyright information.
|
data/spec/better_caller_spec.rb
DELETED