trepanning 1.93.35 → 2.15.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ChangeLog +491 -55
- data/LICENSE +1 -1
- data/NEWS +18 -14
- data/README.md +5 -22
- data/Rakefile +22 -1
- data/app/breakpoint.rb +5 -3
- data/app/core.rb +147 -179
- data/app/default.rb +47 -46
- data/app/file.rb +6 -7
- data/app/frame.rb +183 -176
- data/app/markdown.rb +2 -9
- data/app/options.rb +1 -1
- data/app/run.rb +71 -37
- data/interface/script.rb +8 -8
- data/io.rb +19 -20
- data/lib/trepanning.rb +292 -297
- data/processor.rb +332 -344
- data/processor/breakpoint.rb +98 -96
- data/processor/command/base/submgr.rb +9 -9
- data/processor/command/break.rb +40 -38
- data/processor/command/continue.rb +15 -10
- data/processor/command/debug.rb +6 -25
- data/processor/command/delete.rb +21 -12
- data/processor/command/directory.rb +15 -13
- data/processor/command/disable.rb +12 -9
- data/processor/command/disassemble.rb +80 -74
- data/processor/command/display.rb +15 -12
- data/processor/command/down.rb +8 -3
- data/processor/command/edit.rb +37 -23
- data/processor/command/enable.rb +11 -8
- data/processor/command/eval.rb +24 -22
- data/processor/command/finish.rb +50 -48
- data/processor/command/help.rb +1 -1
- data/processor/command/info_subcmd/breakpoints.rb +7 -7
- data/processor/command/info_subcmd/files.rb +195 -196
- data/processor/command/info_subcmd/frame.rb +7 -4
- data/processor/command/info_subcmd/locals.rb +29 -12
- data/processor/command/info_subcmd/program.rb +48 -39
- data/processor/command/info_subcmd/registers_subcmd/ep.rb +46 -0
- data/processor/command/info_subcmd/registers_subcmd/helper.rb +32 -35
- data/processor/command/info_subcmd/registers_subcmd/sp.rb +29 -23
- data/processor/command/info_subcmd/return.rb +28 -10
- data/processor/command/info_subcmd/variables_subcmd/class.rb +3 -3
- data/processor/command/info_subcmd/variables_subcmd/constants.rb +77 -0
- data/processor/command/info_subcmd/variables_subcmd/globals.rb +7 -7
- data/processor/command/info_subcmd/variables_subcmd/instance.rb +68 -22
- data/processor/command/info_subcmd/variables_subcmd/locals.rb +148 -67
- data/processor/command/list.rb +14 -8
- data/processor/command/macro.rb +1 -1
- data/processor/command/next.rb +1 -0
- data/processor/command/set_subcmd/auto.rb +3 -3
- data/processor/command/set_subcmd/different.rb +30 -29
- data/processor/command/set_subcmd/events.rb +74 -48
- data/processor/command/set_subcmd/max_subcmd/list.rb +12 -5
- data/processor/command/set_subcmd/max_subcmd/width.rb +28 -19
- data/processor/command/set_subcmd/register.rb +37 -0
- data/processor/command/set_subcmd/register_subcmd/pc.rb +67 -0
- data/processor/command/set_subcmd/register_subcmd/sp.rb +75 -0
- data/processor/command/set_subcmd/reload.rb +12 -10
- data/processor/command/set_subcmd/return.rb +68 -44
- data/processor/command/shell.rb +3 -2
- data/processor/command/show_subcmd/different.rb +17 -14
- data/processor/command/show_subcmd/events.rb +25 -25
- data/processor/default.rb +1 -1
- data/processor/eval.rb +14 -15
- data/processor/frame.rb +43 -36
- data/processor/help.rb +5 -5
- data/processor/hook.rb +26 -29
- data/processor/location.rb +54 -51
- data/processor/mock.rb +4 -3
- data/processor/running.rb +113 -103
- data/processor/validate.rb +401 -373
- data/test/data/debug.cmd +8 -0
- data/test/data/debug.right +13 -0
- data/test/data/debugger-stop.right +6 -4
- data/test/data/fname-with-blank.cmd +1 -1
- data/test/data/fname-with-blank.right +5 -0
- data/test/data/pc.cmd +8 -0
- data/test/data/pc.right +10 -0
- data/test/data/quit.right +3 -1
- data/test/data/trace.cmd +2 -2
- data/test/data/trace.right +41 -20
- data/test/example/assign.rb +6 -0
- data/test/functional/fn_helper.rb +11 -17
- data/test/functional/test-break-long.rb +15 -16
- data/test/functional/test-break.rb +6 -8
- data/test/functional/test-condition.rb +8 -10
- data/test/functional/test-debugger-call-bug.rb +21 -22
- data/test/functional/test-delete.rb +57 -59
- data/test/functional/test-eval.rb +101 -103
- data/test/functional/test-finish.rb +24 -33
- data/test/functional/test-immediate-step-bug.rb +6 -10
- data/test/functional/test-next.rb +64 -65
- data/test/functional/test-raise.rb +63 -64
- data/test/functional/test-recursive-bt.rb +81 -76
- data/test/functional/test-remap.rb +6 -7
- data/test/functional/test-return.rb +44 -38
- data/test/functional/test-step.rb +55 -53
- data/test/functional/test-stepbug.rb +6 -9
- data/test/functional/test-watchg.rb +40 -39
- data/test/integration/test-debug.rb +12 -0
- data/test/integration/test-debugger-stop.rb +7 -7
- data/test/integration/test-pc.rb +24 -0
- data/test/integration/test-trace.rb +1 -1
- data/test/unit/cmd-helper.rb +0 -1
- data/test/unit/test-app-brkpt.rb +21 -21
- data/test/unit/test-app-brkptmgr.rb +7 -8
- data/test/unit/test-app-display.rb +3 -4
- data/test/unit/test-app-frame.rb +4 -5
- data/test/unit/test-base-subsubcmd.rb +2 -2
- data/test/unit/test-cmd-break.rb +6 -6
- data/test/unit/test-cmd-endisable.rb +7 -6
- data/test/unit/test-cmd-parse_list_cmd.rb +24 -24
- data/test/unit/test-io-tcpserver.rb +39 -35
- data/test/unit/test-proc-default.rb +23 -22
- data/test/unit/test-proc-eval.rb +1 -2
- data/test/unit/test-proc-frame.rb +8 -9
- data/test/unit/test-proc-list.rb +1 -1
- data/test/unit/test-proc-location.rb +2 -2
- data/test/unit/test-proc-main.rb +10 -10
- data/test/unit/test-proc-validate.rb +11 -13
- data/test/unit/test-subcmd-help.rb +1 -2
- data/trepanning.gemspec +8 -13
- metadata +44 -95
- data/COPYING +0 -57
- data/data/custom_require.rb +0 -44
- data/data/perldb.bindings +0 -17
- data/data/prelude.rb +0 -38
- data/processor/command/info_subcmd/variables_subcmd/constant.rb +0 -41
- data/processor/command/raise.rb +0 -48
- data/processor/command/set_subcmd/pc.rb +0 -62
- data/processor/command/set_subcmd/sp.rb +0 -67
- data/processor/eventbuf.rb +0 -133
metadata
CHANGED
@@ -1,155 +1,101 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trepanning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 2.15.33
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- R. Bernstein
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-08 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0.5'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.5'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rb-threadframe
|
14
|
+
name: redcarpet
|
32
15
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
16
|
requirements:
|
35
|
-
- - ~>
|
17
|
+
- - "~>"
|
36
18
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
19
|
+
version: '3.2'
|
38
20
|
type: :runtime
|
39
21
|
prerelease: false
|
40
22
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
23
|
requirements:
|
43
|
-
- - ~>
|
24
|
+
- - "~>"
|
44
25
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
26
|
+
version: '3.2'
|
46
27
|
- !ruby/object:Gem::Dependency
|
47
28
|
name: columnize
|
48
29
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
30
|
requirements:
|
51
|
-
- - ~>
|
31
|
+
- - "~>"
|
52
32
|
- !ruby/object:Gem::Version
|
53
33
|
version: '0.9'
|
54
34
|
type: :runtime
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
37
|
requirements:
|
59
|
-
- - ~>
|
38
|
+
- - "~>"
|
60
39
|
- !ruby/object:Gem::Version
|
61
40
|
version: '0.9'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: redcarpet
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '3.2'
|
70
|
-
type: :runtime
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '3.2'
|
78
41
|
- !ruby/object:Gem::Dependency
|
79
42
|
name: coderay
|
80
43
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
44
|
requirements:
|
83
|
-
- - ~>
|
45
|
+
- - "~>"
|
84
46
|
- !ruby/object:Gem::Version
|
85
47
|
version: '1.1'
|
86
48
|
type: :runtime
|
87
49
|
prerelease: false
|
88
50
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
51
|
requirements:
|
91
|
-
- - ~>
|
52
|
+
- - "~>"
|
92
53
|
- !ruby/object:Gem::Version
|
93
54
|
version: '1.1'
|
94
55
|
- !ruby/object:Gem::Dependency
|
95
56
|
name: term-ansicolor
|
96
57
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
58
|
requirements:
|
99
|
-
- - ~>
|
59
|
+
- - "~>"
|
100
60
|
- !ruby/object:Gem::Version
|
101
61
|
version: '1.3'
|
102
62
|
type: :runtime
|
103
63
|
prerelease: false
|
104
64
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
65
|
requirements:
|
107
|
-
- - ~>
|
66
|
+
- - "~>"
|
108
67
|
- !ruby/object:Gem::Version
|
109
68
|
version: '1.3'
|
110
69
|
- !ruby/object:Gem::Dependency
|
111
70
|
name: diff-lcs
|
112
71
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
72
|
requirements:
|
115
|
-
- - ~>
|
73
|
+
- - "~>"
|
116
74
|
- !ruby/object:Gem::Version
|
117
75
|
version: '0'
|
118
76
|
type: :development
|
119
77
|
prerelease: false
|
120
78
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
79
|
requirements:
|
123
|
-
- - ~>
|
80
|
+
- - "~>"
|
124
81
|
- !ruby/object:Gem::Version
|
125
82
|
version: '0'
|
126
|
-
description:
|
127
|
-
|
128
|
-
|
129
|
-
A gdb-like Ruby debugger with both high and low-level debugging support.
|
130
|
-
|
131
|
-
|
132
|
-
See https://github.com/rocky/rb-trepanning/wiki/Features for a list of features.
|
133
|
-
|
83
|
+
description: |
|
84
|
+
A Ruby debugger with both high and low-level debugging support.
|
134
85
|
|
135
86
|
To provide the advanced features this version works only with a
|
87
|
+
patched MRI Ruby 2.1.5 runtime.
|
136
88
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
This version works only with a patched version of Ruby 1.9.3
|
141
|
-
|
142
|
-
Ruby 2.1.5, look for a version that starts with 2.1.5
|
143
|
-
|
144
|
-
'
|
89
|
+
This version works only with a patched version of Ruby 2.1.5
|
90
|
+
For a version that works with Ruby 1.9.3 look install a version
|
91
|
+
starting with 1.93.
|
145
92
|
email: rockyb@rubyforge.net
|
146
93
|
executables:
|
147
94
|
- trepan
|
148
95
|
extensions: []
|
149
96
|
extra_rdoc_files: []
|
150
97
|
files:
|
151
|
-
- .gitignore
|
152
|
-
- COPYING
|
98
|
+
- ".gitignore"
|
153
99
|
- ChangeLog
|
154
100
|
- LICENSE
|
155
101
|
- Makefile
|
@@ -186,10 +132,7 @@ files:
|
|
186
132
|
- bin/trepan
|
187
133
|
- check-filter.rb
|
188
134
|
- data/.gitignore
|
189
|
-
- data/custom_require.rb
|
190
135
|
- data/irbrc
|
191
|
-
- data/perldb.bindings
|
192
|
-
- data/prelude.rb
|
193
136
|
- interface.rb
|
194
137
|
- interface/.gitignore
|
195
138
|
- interface/client.rb
|
@@ -258,6 +201,7 @@ files:
|
|
258
201
|
- processor/command/info_subcmd/program.rb
|
259
202
|
- processor/command/info_subcmd/registers.rb
|
260
203
|
- processor/command/info_subcmd/registers_subcmd/.gitignore
|
204
|
+
- processor/command/info_subcmd/registers_subcmd/ep.rb
|
261
205
|
- processor/command/info_subcmd/registers_subcmd/helper.rb
|
262
206
|
- processor/command/info_subcmd/registers_subcmd/pc.rb
|
263
207
|
- processor/command/info_subcmd/registers_subcmd/sp.rb
|
@@ -269,7 +213,7 @@ files:
|
|
269
213
|
- processor/command/info_subcmd/variables.rb
|
270
214
|
- processor/command/info_subcmd/variables_subcmd/.gitignore
|
271
215
|
- processor/command/info_subcmd/variables_subcmd/class.rb
|
272
|
-
- processor/command/info_subcmd/variables_subcmd/
|
216
|
+
- processor/command/info_subcmd/variables_subcmd/constants.rb
|
273
217
|
- processor/command/info_subcmd/variables_subcmd/globals.rb
|
274
218
|
- processor/command/info_subcmd/variables_subcmd/instance.rb
|
275
219
|
- processor/command/info_subcmd/variables_subcmd/locals.rb
|
@@ -281,7 +225,6 @@ files:
|
|
281
225
|
- processor/command/pr.rb
|
282
226
|
- processor/command/ps.rb
|
283
227
|
- processor/command/quit.rb
|
284
|
-
- processor/command/raise.rb
|
285
228
|
- processor/command/reload.rb
|
286
229
|
- processor/command/reload_subcmd/.gitignore
|
287
230
|
- processor/command/reload_subcmd/command.rb
|
@@ -315,10 +258,11 @@ files:
|
|
315
258
|
- processor/command/set_subcmd/max_subcmd/stack.rb
|
316
259
|
- processor/command/set_subcmd/max_subcmd/string.rb
|
317
260
|
- processor/command/set_subcmd/max_subcmd/width.rb
|
318
|
-
- processor/command/set_subcmd/
|
261
|
+
- processor/command/set_subcmd/register.rb
|
262
|
+
- processor/command/set_subcmd/register_subcmd/pc.rb
|
263
|
+
- processor/command/set_subcmd/register_subcmd/sp.rb
|
319
264
|
- processor/command/set_subcmd/reload.rb
|
320
265
|
- processor/command/set_subcmd/return.rb
|
321
|
-
- processor/command/set_subcmd/sp.rb
|
322
266
|
- processor/command/set_subcmd/substitute.rb
|
323
267
|
- processor/command/set_subcmd/substitute_subcmd/.gitignore
|
324
268
|
- processor/command/set_subcmd/substitute_subcmd/eval.rb
|
@@ -378,7 +322,6 @@ files:
|
|
378
322
|
- processor/default.rb
|
379
323
|
- processor/display.rb
|
380
324
|
- processor/eval.rb
|
381
|
-
- processor/eventbuf.rb
|
382
325
|
- processor/frame.rb
|
383
326
|
- processor/help.rb
|
384
327
|
- processor/hook.rb
|
@@ -397,12 +340,16 @@ files:
|
|
397
340
|
- sample/rocky-trepan-colors.rb
|
398
341
|
- test/Makefile
|
399
342
|
- test/data/.gitignore
|
343
|
+
- test/data/debug.cmd
|
344
|
+
- test/data/debug.right
|
400
345
|
- test/data/debugger-stop.cmd
|
401
346
|
- test/data/debugger-stop.right
|
402
347
|
- test/data/enable.cmd
|
403
348
|
- test/data/enable.right
|
404
349
|
- test/data/fname-with-blank.cmd
|
405
350
|
- test/data/fname-with-blank.right
|
351
|
+
- test/data/pc.cmd
|
352
|
+
- test/data/pc.right
|
406
353
|
- test/data/quit.cmd
|
407
354
|
- test/data/quit.right
|
408
355
|
- test/data/quit2.cmd
|
@@ -412,6 +359,7 @@ files:
|
|
412
359
|
- test/data/trace.cmd
|
413
360
|
- test/data/trace.right
|
414
361
|
- test/example/.gitignore
|
362
|
+
- test/example/assign.rb
|
415
363
|
- test/example/debugger-stop.rb
|
416
364
|
- test/example/factorial.rb
|
417
365
|
- test/example/fname with blank.rb
|
@@ -442,8 +390,10 @@ files:
|
|
442
390
|
- test/integration/.gitignore
|
443
391
|
- test/integration/file-diff.rb
|
444
392
|
- test/integration/helper.rb
|
393
|
+
- test/integration/test-debug.rb
|
445
394
|
- test/integration/test-debugger-stop.rb
|
446
395
|
- test/integration/test-fname-with-blank.rb
|
396
|
+
- test/integration/test-pc.rb
|
447
397
|
- test/integration/test-quit.rb
|
448
398
|
- test/integration/test-remote.rb
|
449
399
|
- test/integration/test-trace.rb
|
@@ -503,30 +453,29 @@ files:
|
|
503
453
|
homepage: http://wiki.github.com/rocky/rb-trepanning
|
504
454
|
licenses:
|
505
455
|
- MIT
|
456
|
+
metadata: {}
|
506
457
|
post_install_message:
|
507
458
|
rdoc_options:
|
508
|
-
- --main
|
459
|
+
- "--main"
|
509
460
|
- README
|
510
|
-
- --title
|
511
|
-
- Trepan
|
461
|
+
- "--title"
|
462
|
+
- Trepan 2.15.33 Documentation
|
512
463
|
require_paths:
|
513
464
|
- lib
|
514
465
|
required_ruby_version: !ruby/object:Gem::Requirement
|
515
|
-
none: false
|
516
466
|
requirements:
|
517
|
-
- - ~>
|
467
|
+
- - "~>"
|
518
468
|
- !ruby/object:Gem::Version
|
519
|
-
version: 1.
|
469
|
+
version: 2.1.5
|
520
470
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
521
|
-
none: false
|
522
471
|
requirements:
|
523
|
-
- -
|
472
|
+
- - ">="
|
524
473
|
- !ruby/object:Gem::Version
|
525
474
|
version: '0'
|
526
475
|
requirements: []
|
527
476
|
rubyforge_project:
|
528
|
-
rubygems_version:
|
477
|
+
rubygems_version: 2.2.2
|
529
478
|
signing_key:
|
530
|
-
specification_version:
|
531
|
-
summary: Enhanced Ruby 1
|
479
|
+
specification_version: 4
|
480
|
+
summary: Enhanced Ruby 2.1 Debugger
|
532
481
|
test_files: []
|
data/COPYING
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
Columnize is copyrighted free software by Rocky Bernstein <rocky@rubyforge.org>.
|
2
|
-
|
3
|
-
You can redistribute it and/or modify it under either the terms of the GPL
|
4
|
-
version 2, or the conditions below:
|
5
|
-
|
6
|
-
1. You may make and give away verbatim copies of the source form of the
|
7
|
-
software without restriction, provided that you duplicate all of the
|
8
|
-
original copyright notices and associated disclaimers.
|
9
|
-
|
10
|
-
2. You may modify your copy of the software in any way, provided that
|
11
|
-
you do at least ONE of the following:
|
12
|
-
|
13
|
-
a) place your modifications in the Public Domain or otherwise
|
14
|
-
make them Freely Available, such as by posting said
|
15
|
-
modifications to Usenet or an equivalent medium, or by allowing
|
16
|
-
the author to include your modifications in the software.
|
17
|
-
|
18
|
-
b) use the modified software only within your corporation or
|
19
|
-
organization.
|
20
|
-
|
21
|
-
c) give non-standard binaries non-standard names, with
|
22
|
-
instructions on where to get the original software distribution.
|
23
|
-
|
24
|
-
d) make other distribution arrangements with the author.
|
25
|
-
|
26
|
-
3. You may distribute the software in object code or binary form,
|
27
|
-
provided that you do at least ONE of the following:
|
28
|
-
|
29
|
-
a) distribute the binaries and library files of the software,
|
30
|
-
together with instructions (in the manual page or equivalent)
|
31
|
-
on where to get the original distribution.
|
32
|
-
|
33
|
-
b) accompany the distribution with the machine-readable source of
|
34
|
-
the software.
|
35
|
-
|
36
|
-
c) give non-standard binaries non-standard names, with
|
37
|
-
instructions on where to get the original software distribution.
|
38
|
-
|
39
|
-
d) make other distribution arrangements with the author.
|
40
|
-
|
41
|
-
4. You may modify and include the part of the software into any other
|
42
|
-
software (possibly commercial). But some files in the distribution
|
43
|
-
are not written by the author, so that they are not under these terms.
|
44
|
-
|
45
|
-
For the list of those files and their copying conditions, see the
|
46
|
-
file LEGAL.
|
47
|
-
|
48
|
-
5. The scripts and library files supplied as input to or produced as
|
49
|
-
output from the software do not automatically fall under the
|
50
|
-
copyright of the software, but belong to whomever generated them,
|
51
|
-
and may be sold commercially, and may be aggregated with this
|
52
|
-
software.
|
53
|
-
|
54
|
-
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
55
|
-
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
56
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
57
|
-
PURPOSE.
|
data/data/custom_require.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
3
|
-
# All rights reserved.
|
4
|
-
# See LICENSE.txt for permissions.
|
5
|
-
#++
|
6
|
-
|
7
|
-
module Kernel
|
8
|
-
|
9
|
-
##
|
10
|
-
# The Kernel#require from before RubyGems was loaded.
|
11
|
-
|
12
|
-
alias gem_original_require require
|
13
|
-
|
14
|
-
##
|
15
|
-
# When RubyGems is required, Kernel#require is replaced with our own which
|
16
|
-
# is capable of loading gems on demand.
|
17
|
-
#
|
18
|
-
# When you call <tt>require 'x'</tt>, this is what happens:
|
19
|
-
# * If the file can be loaded from the existing Ruby loadpath, it
|
20
|
-
# is.
|
21
|
-
# * Otherwise, installed gems are searched for a file that matches.
|
22
|
-
# If it's found in gem 'y', that gem is activated (added to the
|
23
|
-
# loadpath).
|
24
|
-
#
|
25
|
-
# The normal <tt>require</tt> functionality of returning false if
|
26
|
-
# that file has already been loaded is preserved.
|
27
|
-
|
28
|
-
def require(path) # :doc:
|
29
|
-
gem_original_require path
|
30
|
-
rescue LoadError => load_error
|
31
|
-
if load_error.message.end_with?(path)
|
32
|
-
if Gem.try_activate(path)
|
33
|
-
return gem_original_require(path)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
raise load_error
|
38
|
-
end
|
39
|
-
|
40
|
-
private :require
|
41
|
-
private :gem_original_require
|
42
|
-
|
43
|
-
end unless Kernel.private_method_defined?(:gem_original_require)
|
44
|
-
|
data/data/perldb.bindings
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Aliases to simulate some of the Perl debugger command set
|
2
|
-
alias = alias
|
3
|
-
alias R restart
|
4
|
-
alias b break
|
5
|
-
alias c continue
|
6
|
-
alias f list
|
7
|
-
alias n next
|
8
|
-
alias p pr
|
9
|
-
alias q quit
|
10
|
-
alias s step
|
11
|
-
alias v list
|
12
|
-
macro - Proc.new{|*args| "list -"}
|
13
|
-
macro E Proc.new{|*args| "info thread"}
|
14
|
-
macro L Proc.new{|*args| "info break"}
|
15
|
-
macro T Proc.new{|*args| "info stack"}
|
16
|
-
macro l Proc.new{|*args| "list>"}
|
17
|
-
macro r Proc.new{|*args| %w(finish step)}
|
data/data/prelude.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
|
2
|
-
# Mutex
|
3
|
-
|
4
|
-
class Mutex
|
5
|
-
def synchronize
|
6
|
-
self.lock
|
7
|
-
begin
|
8
|
-
yield
|
9
|
-
ensure
|
10
|
-
self.unlock rescue nil
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
# Thread
|
16
|
-
|
17
|
-
class Thread
|
18
|
-
MUTEX_FOR_THREAD_EXCLUSIVE = Mutex.new
|
19
|
-
def self.exclusive
|
20
|
-
MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{
|
21
|
-
yield
|
22
|
-
}
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
module Kernel
|
27
|
-
module_function
|
28
|
-
def require_relative(relative_feature)
|
29
|
-
c = caller.first
|
30
|
-
e = c.rindex(/:\d+:in /)
|
31
|
-
file = $`
|
32
|
-
if /\A\((.*)\)/ =~ file # eval, etc.
|
33
|
-
raise LoadError, "require_relative is called in #{$1}"
|
34
|
-
end
|
35
|
-
absolute_feature = File.expand_path(File.join(File.dirname(file), relative_feature))
|
36
|
-
require absolute_feature
|
37
|
-
end
|
38
|
-
end
|