trepanning 0.0.8 → 0.0.9

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.
@@ -26,6 +26,7 @@ class TestAppFile < Test::Unit::TestCase
26
26
 
27
27
  def test_find_iseqs
28
28
  iseqs = find_iseqs(ISEQS__, "tmpdir")
29
+ p ISEQS__.keys
29
30
  assert_equal(false, iseqs.empty?)
30
31
  iseqs = find_iseqs(ISEQS__, "tmpdir@#{__FILE__}")
31
32
  assert_equal(true, iseqs.empty?)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 8
9
- version: 0.0.8
8
+ - 9
9
+ version: 0.0.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - R. Bernstein
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-10 00:00:00 -05:00
17
+ date: 2010-12-25 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -124,9 +124,6 @@ files:
124
124
  - app/run.rb
125
125
  - app/condition.rb
126
126
  - bin/trepan
127
- - data/custom_require.rb
128
- - data/prelude.rb
129
- - data/irbrc
130
127
  - interface/script.rb
131
128
  - interface/base_intf.rb
132
129
  - interface/user.rb
@@ -267,6 +264,12 @@ files:
267
264
  - processor/command/backtrace.rb
268
265
  - processor/command/condition.rb
269
266
  - processor/command/reload_subcmd/command.rb
267
+ - test/data/enable.cmd
268
+ - test/data/quit.cmd
269
+ - test/data/fname-with-blank.cmd
270
+ - test/data/enable.right
271
+ - test/data/quit.right
272
+ - test/data/fname-with-blank.right
270
273
  - test/example/fname with blank.rb
271
274
  - test/example/null.rb
272
275
  - test/example/thread1.rb
@@ -333,7 +336,7 @@ rdoc_options:
333
336
  - --main
334
337
  - README
335
338
  - --title
336
- - Trepan 0.0.8 Documentation
339
+ - Trepan 0.0.9 Documentation
337
340
  require_paths:
338
341
  - lib
339
342
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -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/irbrc DELETED
@@ -1,41 +0,0 @@
1
- # -*- Ruby -*-
2
- # Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net>
3
- # We use this as the default startup file for irb inside trepan
4
- # Down the line we will have a way for folks to add/override this
5
- # with their own file.
6
- IRB.conf[:PROMPT_MODE] = :SIMPLE
7
- IRB.conf[:PROMPT][:SIMPLE] =
8
- {:PROMPT_C=>"trepan ?> ",
9
- :PROMPT_I=>"trepan >> ",
10
- :PROMPT_N=>"trepan >> ",
11
- :PROMPT_S=>nil,
12
- :RETURN=>"=> %s\n"}
13
-
14
- # Using dbgr to issue a debugger statement inside irb:
15
- # dbgr %w(info program)
16
- # dbgr 'info program' # also works
17
- # But...
18
- # dbgr info program # wrong!
19
- #
20
- puts "You are in a trepan session. You should have access to program scope."
21
- puts "'dbgr', 'step', 'ne', 'q', 'cont' commands have been added."
22
-
23
- if defined?($trepan) && $trepan
24
- puts 'You should have access to debugger state via global variable $trepan'
25
- end
26
- if defined?($trepan_frame) && $trepan_frame
27
- puts 'You should have access to the program frame via global variable $trepan_frame'
28
- end
29
- if defined?($trepan_cmdproc) && $trepan_cmdproc
30
- puts 'You should have access to the command processor via global variable $trepan_cmdproc'
31
- end
32
-
33
- # Monkeypatch to save the current IRB statement to be run.
34
- class IRB::Context
35
- alias_method :_trepan_original_evaluate, :evaluate
36
- def evaluate(line, line_no)
37
- $trepan_irb_statements = line
38
- _trepan_original_evaluate(line, line_no)
39
- end
40
- end
41
-
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