ruby-debug-base19x 0.11.26 → 0.11.27

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.
data/test/base/base.rb CHANGED
@@ -1,74 +1,74 @@
1
- #!/usr/bin/env ruby
2
- require 'test/unit'
3
-
4
- # Some tests of Debugger module in C extension ruby_debug
5
- class TestRubyDebug < Test::Unit::TestCase
6
- $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
7
- require 'ruby_debug'
8
- $:.shift
9
-
10
- # test current_context
11
- def test_current_context
12
- assert_equal(false, Debugger.started?,
13
- 'debugger should not initially be started.')
14
- Debugger.start_
15
- assert(Debugger.started?,
16
- 'debugger should now be started.')
17
- assert_equal(__LINE__, Debugger.current_context.frame_line)
18
- assert_equal(nil, Debugger.current_context.frame_args_info,
19
- 'no frame args info.')
20
- assert_equal(Debugger.current_context.frame_file,
21
- Debugger.current_context.frame_file(0))
22
- assert_equal(File.basename(__FILE__),
23
- File.basename(Debugger.current_context.frame_file))
24
- assert_raises(ArgumentError) {Debugger.current_context.frame_file(1, 2)}
25
- assert_raises(ArgumentError) {Debugger.current_context.frame_file(10)}
26
- assert_equal(1, Debugger.current_context.stack_size)
27
- assert_equal(TestRubyDebug, Debugger.current_context.frame_class)
28
- assert_equal(false, Debugger.current_context.dead?, 'Not dead yet!')
29
- Debugger.stop
30
- assert_equal(false, Debugger.started?,
31
- 'Debugger should no longer be started.')
32
- end
33
-
34
- # Test initial variables and setting/getting state.
35
- def test_debugger_base
36
- assert_equal(false, Debugger.started?,
37
- 'Debugger should not initially be started.')
38
- Debugger.start_
39
- assert(Debugger.started?,
40
- 'Debugger should now be started.')
41
- assert_equal(false, Debugger.debug,
42
- 'Debug variable should not be set.')
43
- assert_equal(false, Debugger.post_mortem?,
44
- 'Post mortem debugging should not be set.')
45
- a = Debugger.contexts
46
- assert_equal(1, a.size,
47
- 'There should only be one context.')
48
- assert_equal(Array, a.class,
49
- 'Context should be an array.')
50
- Debugger.stop
51
- assert_equal(false, Debugger.started?,
52
- 'debugger should no longer be started.')
53
- end
54
-
55
- # Test breakpoint handling
56
- def test_breakpoints
57
- Debugger.start_
58
- assert_equal(0, Debugger.breakpoints.size,
59
- 'There should not be any breakpoints set.')
60
- brk = Debugger.add_breakpoint(__FILE__, 1)
61
- assert_equal(Debugger::Breakpoint, brk.class,
62
- 'Breakpoint should have been set and returned.')
63
- assert_equal(1, Debugger.breakpoints.size,
64
- 'There should now be one breakpoint set.')
65
- Debugger.remove_breakpoint(0)
66
- assert_equal(1, Debugger.breakpoints.size,
67
- 'There should still be one breakpoint set.')
68
- Debugger.remove_breakpoint(1)
69
- assert_equal(0, Debugger.breakpoints.size,
70
- 'There should no longer be any breakpoints set.')
71
- Debugger.stop
72
- end
73
- end
74
-
1
+ #!/usr/bin/env ruby
2
+ require 'test/unit'
3
+
4
+ # Some tests of Debugger module in C extension ruby_debug
5
+ class TestRubyDebug < Test::Unit::TestCase
6
+ $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
7
+ require 'ruby_debug'
8
+ $:.shift
9
+
10
+ # test current_context
11
+ def test_current_context
12
+ assert_equal(false, Debugger.started?,
13
+ 'debugger should not initially be started.')
14
+ Debugger.start_
15
+ assert(Debugger.started?,
16
+ 'debugger should now be started.')
17
+ assert_equal(__LINE__, Debugger.current_context.frame_line)
18
+ assert_equal(nil, Debugger.current_context.frame_args_info,
19
+ 'no frame args info.')
20
+ assert_equal(Debugger.current_context.frame_file,
21
+ Debugger.current_context.frame_file(0))
22
+ assert_equal(File.basename(__FILE__),
23
+ File.basename(Debugger.current_context.frame_file))
24
+ assert_raises(ArgumentError) {Debugger.current_context.frame_file(1, 2)}
25
+ assert_raises(ArgumentError) {Debugger.current_context.frame_file(10)}
26
+ assert_equal(1, Debugger.current_context.stack_size)
27
+ assert_equal(TestRubyDebug, Debugger.current_context.frame_class)
28
+ assert_equal(false, Debugger.current_context.dead?, 'Not dead yet!')
29
+ Debugger.stop
30
+ assert_equal(false, Debugger.started?,
31
+ 'Debugger should no longer be started.')
32
+ end
33
+
34
+ # Test initial variables and setting/getting state.
35
+ def test_debugger_base
36
+ assert_equal(false, Debugger.started?,
37
+ 'Debugger should not initially be started.')
38
+ Debugger.start_
39
+ assert(Debugger.started?,
40
+ 'Debugger should now be started.')
41
+ assert_equal(false, Debugger.debug,
42
+ 'Debug variable should not be set.')
43
+ assert_equal(false, Debugger.post_mortem?,
44
+ 'Post mortem debugging should not be set.')
45
+ a = Debugger.contexts
46
+ assert_equal(1, a.size,
47
+ 'There should only be one context.')
48
+ assert_equal(Array, a.class,
49
+ 'Context should be an array.')
50
+ Debugger.stop
51
+ assert_equal(false, Debugger.started?,
52
+ 'debugger should no longer be started.')
53
+ end
54
+
55
+ # Test breakpoint handling
56
+ def test_breakpoints
57
+ Debugger.start_
58
+ assert_equal(0, Debugger.breakpoints.size,
59
+ 'There should not be any breakpoints set.')
60
+ brk = Debugger.add_breakpoint(__FILE__, 1)
61
+ assert_equal(Debugger::Breakpoint, brk.class,
62
+ 'Breakpoint should have been set and returned.')
63
+ assert_equal(1, Debugger.breakpoints.size,
64
+ 'There should now be one breakpoint set.')
65
+ Debugger.remove_breakpoint(0)
66
+ assert_equal(1, Debugger.breakpoints.size,
67
+ 'There should still be one breakpoint set.')
68
+ Debugger.remove_breakpoint(1)
69
+ assert_equal(0, Debugger.breakpoints.size,
70
+ 'There should no longer be any breakpoints set.')
71
+ Debugger.stop
72
+ end
73
+ end
74
+
data/test/base/binding.rb CHANGED
@@ -1,31 +1,31 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'test/unit'
4
-
5
- # Test binding_n command
6
- class TestBinding < Test::Unit::TestCase
7
-
8
- SRC_DIR = File.expand_path(File.dirname(__FILE__)) unless
9
- defined?(SRC_DIR)
10
- %w(ext lib).each do |dir|
11
- $:.unshift File.join(SRC_DIR, '..', '..', dir)
12
- end
13
- require File.join(SRC_DIR, '..', '..', 'lib', 'ruby-debug-base')
14
- $:.shift; $:.shift
15
-
16
- def test_basic
17
- def inside_fn
18
- s = 'some other string'
19
- b2 = Kernel::binding_n(1)
20
- y2 = eval('s', b2)
21
- assert_equal('this is a test', y2)
22
- end
23
- s = 'this is a test'
24
- Debugger.start
25
- b = Kernel::binding_n(0)
26
- y = eval('s', b)
27
- assert_equal(y, s)
28
- inside_fn
29
- Debugger.stop
30
- end
31
- end
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+
5
+ # Test binding_n command
6
+ class TestBinding < Test::Unit::TestCase
7
+
8
+ SRC_DIR = File.expand_path(File.dirname(__FILE__)) unless
9
+ defined?(SRC_DIR)
10
+ %w(ext lib).each do |dir|
11
+ $:.unshift File.join(SRC_DIR, '..', '..', dir)
12
+ end
13
+ require File.join(SRC_DIR, '..', '..', 'lib', 'ruby-debug-base')
14
+ $:.shift; $:.shift
15
+
16
+ def test_basic
17
+ def inside_fn
18
+ s = 'some other string'
19
+ b2 = Kernel::binding_n(1)
20
+ y2 = eval('s', b2)
21
+ assert_equal('this is a test', y2)
22
+ end
23
+ s = 'this is a test'
24
+ Debugger.start
25
+ b = Kernel::binding_n(0)
26
+ y = eval('s', b)
27
+ assert_equal(y, s)
28
+ inside_fn
29
+ Debugger.stop
30
+ end
31
+ end
@@ -1,26 +1,26 @@
1
- #!/usr/bin/env ruby
2
- require 'test/unit'
3
-
4
- # Test catchpoint in C ruby_debug extension.
5
-
6
- class TestRubyDebugCatchpoint < Test::Unit::TestCase
7
-
8
- $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
9
- require 'ruby_debug'
10
- $:.shift
11
-
12
- # test current_context
13
- def test_catchpoints
14
- assert_raise(RuntimeError) {Debugger.catchpoints}
15
- Debugger.start_
16
- assert_equal({}, Debugger.catchpoints)
17
- Debugger.add_catchpoint('ZeroDivisionError')
18
- assert_equal({'ZeroDivisionError' => 0}, Debugger.catchpoints)
19
- Debugger.add_catchpoint('RuntimeError')
20
- assert_equal(['RuntimeError', 'ZeroDivisionError'],
21
- Debugger.catchpoints.keys.sort)
22
- Debugger.stop
23
- end
24
-
25
- end
26
-
1
+ #!/usr/bin/env ruby
2
+ require 'test/unit'
3
+
4
+ # Test catchpoint in C ruby_debug extension.
5
+
6
+ class TestRubyDebugCatchpoint < Test::Unit::TestCase
7
+
8
+ $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
9
+ require 'ruby_debug'
10
+ $:.shift
11
+
12
+ # test current_context
13
+ def test_catchpoints
14
+ assert_raise(RuntimeError) {Debugger.catchpoints}
15
+ Debugger.start_
16
+ assert_equal({}, Debugger.catchpoints)
17
+ Debugger.add_catchpoint('ZeroDivisionError')
18
+ assert_equal({'ZeroDivisionError' => 0}, Debugger.catchpoints)
19
+ Debugger.add_catchpoint('RuntimeError')
20
+ assert_equal(['RuntimeError', 'ZeroDivisionError'],
21
+ Debugger.catchpoints.keys.sort)
22
+ Debugger.stop
23
+ end
24
+
25
+ end
26
+
metadata CHANGED
@@ -1,82 +1,62 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-base19x
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 11
8
- - 26
9
- version: 0.11.26
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.11.27
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Kent Sibilev, Mark Moseley
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-03-25 00:00:00 +03:00
12
+ date: 2011-04-12 00:00:00.000000000 +04:00
18
13
  default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: columnize
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &21924816 !ruby/object:Gem::Requirement
24
18
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 3
31
- - 1
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
32
22
  version: 0.3.1
33
23
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: ruby_core_source
37
24
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *21924816
26
+ - !ruby/object:Gem::Dependency
27
+ name: ruby_core_source
28
+ requirement: &21924492 !ruby/object:Gem::Requirement
39
29
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- - 1
46
- - 4
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
47
33
  version: 0.1.4
48
34
  type: :runtime
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: linecache19
52
35
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *21924492
37
+ - !ruby/object:Gem::Dependency
38
+ name: linecache19
39
+ requirement: &21924204 !ruby/object:Gem::Requirement
54
40
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- segments:
59
- - 0
60
- - 5
61
- - 11
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
62
44
  version: 0.5.11
63
45
  type: :runtime
64
- version_requirements: *id003
65
- description: |
66
- ruby-debug is a fast implementation of the standard Ruby debugger debug.rb.
67
- It is implemented by utilizing a new Ruby C API hook. The core component
68
- provides support that front-ends can build on. It provides breakpoint
69
- handling, bindings for stack frames among other things.
70
-
46
+ prerelease: false
47
+ version_requirements: *21924204
48
+ description: ! "ruby-debug is a fast implementation of the standard Ruby debugger
49
+ debug.rb.\nIt is implemented by utilizing a new Ruby C API hook. The core component
50
+ \nprovides support that front-ends can build on. It provides breakpoint \nhandling,
51
+ bindings for stack frames among other things.\n"
71
52
  email: ksibilev@yahoo.com
72
53
  executables: []
73
-
74
- extensions:
54
+ extensions:
75
55
  - ext/ruby_debug/extconf.rb
76
- extra_rdoc_files:
56
+ extra_rdoc_files:
77
57
  - README
78
58
  - ext/ruby_debug/ruby_debug.c
79
- files:
59
+ files:
80
60
  - AUTHORS
81
61
  - CHANGES
82
62
  - LICENSE
@@ -86,46 +66,37 @@ files:
86
66
  - ext/ruby_debug/extconf.rb
87
67
  - ext/ruby_debug/ruby_debug.c
88
68
  - ext/ruby_debug/ruby_debug.h
89
- - lib/ruby-debug-base.rb
90
69
  - lib/ChangeLog
70
+ - lib/ruby-debug-base.rb
91
71
  - test/base/base.rb
92
72
  - test/base/binding.rb
93
73
  - test/base/catchpoint.rb
94
74
  has_rdoc: true
95
75
  homepage: http://rubyforge.org/projects/ruby-debug/
96
76
  licenses: []
97
-
98
77
  post_install_message:
99
78
  rdoc_options: []
100
-
101
- require_paths:
79
+ require_paths:
102
80
  - lib
103
- required_ruby_version: !ruby/object:Gem::Requirement
81
+ required_ruby_version: !ruby/object:Gem::Requirement
104
82
  none: false
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- segments:
109
- - 1
110
- - 8
111
- - 2
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
112
86
  version: 1.8.2
113
- required_rubygems_version: !ruby/object:Gem::Requirement
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
88
  none: false
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- segments:
119
- - 0
120
- version: "0"
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
121
93
  requirements: []
122
-
123
94
  rubyforge_project: ruby-debug19
124
- rubygems_version: 1.3.7
95
+ rubygems_version: 1.5.2
125
96
  signing_key:
126
97
  specification_version: 3
127
98
  summary: Fast Ruby debugger - core component
128
- test_files:
99
+ test_files:
129
100
  - test/base/base.rb
130
101
  - test/base/binding.rb
131
102
  - test/base/catchpoint.rb