linecache 0.4 → 0.41

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/ChangeLog CHANGED
@@ -1,3 +1,25 @@
1
+ 2008-04-10 20:02 Rocky Bernstein
2
+
3
+ * ChangeLog, Rakefile, VERSION: Forgot to add test/data to the gem.
4
+
5
+ 2008-04-10 02:15 Rocky Bernstein
6
+
7
+ * NEWS:
8
+
9
+ 2008-03-28 15:04 Rocky Bernstein
10
+
11
+ * test/data/if6.rb, test/data/if7.rb: More if tests
12
+
13
+ 2008-03-09 23:24 Rocky Bernstein
14
+
15
+ * ChangeLog, Rakefile, VERSION, lib/linecache.rb: Deal with
16
+ Depricated win32.
17
+
18
+ 2008-03-05 02:01 Rocky Bernstein
19
+
20
+ * Rakefile: Add rubyforge_upload task -- code from
21
+ ruby-memory-profiler.
22
+
1
23
  2008-03-04 22:47 Rocky Bernstein
2
24
 
3
25
  * README: Ooops - forgot to credit Ryan Davis and ParseTree.
data/NEWS CHANGED
@@ -1,3 +1,6 @@
1
+ 0.41
2
+ - add test/data/* to gem.
3
+
1
4
  0.4
2
5
  - Credit Ryan Davis and ParseTree.
3
6
 
@@ -19,4 +22,4 @@
19
22
 
20
23
  - Initial release of LineCache, a module for reading and caching lines.
21
24
 
22
- $Id: NEWS 117 2008-04-10 02:15:32Z rockyb $
25
+ $Id: NEWS 119 2008-04-10 20:06:39Z rockyb $
data/Rakefile CHANGED
@@ -28,6 +28,7 @@ FILES = FileList[
28
28
  'ext/extconf.rb',
29
29
  'lib/*.rb',
30
30
  'test/*.rb',
31
+ 'test/data/*.rb',
31
32
  'test/short-file'
32
33
  ]
33
34
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4
1
+ 0.41
@@ -0,0 +1,3 @@
1
+ # [ 2 ]
2
+ begin
3
+ end
@@ -0,0 +1,3 @@
1
+ # [ 2, 2 ]
2
+ begin begin end end
3
+
@@ -0,0 +1,6 @@
1
+ # [ 2, 3 ]
2
+ begin
3
+ begin
4
+ end
5
+ end
6
+
@@ -0,0 +1,7 @@
1
+ # [2, 2, 3, 4, 6, 6]
2
+ if true
3
+ puts '3'
4
+ puts '4'
5
+ end
6
+ if true
7
+ end
@@ -0,0 +1,4 @@
1
+ # [2, 4, 4]
2
+ def foo(&block)
3
+ end
4
+ foo{4}
@@ -0,0 +1,6 @@
1
+ # [ 2, 3, 4 ]
2
+ case 2
3
+ when 3
4
+ when 4
5
+ else
6
+ end
@@ -0,0 +1,5 @@
1
+ # [ 5, 3, 4 ]
2
+ case
3
+ when 3 != 3
4
+ when 4 != 4
5
+ end
@@ -0,0 +1,5 @@
1
+ # [2, 3, 4]
2
+ case "2"
3
+ when Array
4
+ when Fixnum
5
+ end
@@ -0,0 +1,4 @@
1
+ # [2, 3, 3]
2
+ case "2"
3
+ when Array, Fixnum
4
+ end
@@ -0,0 +1,10 @@
1
+ # [3, 4, 5, 6, 7, 9]
2
+ # Note: lines 5 and 7 won't appear in a trace.
3
+ case '3'
4
+ when '4'
5
+ x = 5
6
+ when '6'
7
+ x = 7
8
+ else
9
+ x = 9
10
+ end
@@ -0,0 +1,5 @@
1
+ # [3, 4]
2
+ class
3
+ A
4
+ class B ;
5
+ end end
@@ -0,0 +1,6 @@
1
+ # []
2
+
3
+ # space here and in next line
4
+
5
+
6
+
data/test/data/def1.rb ADDED
@@ -0,0 +1,9 @@
1
+ # [3, 4, 8]
2
+ def
3
+ a ; end
4
+ def b
5
+ end
6
+ def c(
7
+ a=7,
8
+ b=8)
9
+ end
@@ -0,0 +1,3 @@
1
+ # [ 2 ]
2
+ [2].each { }
3
+
data/test/data/end.rb ADDED
@@ -0,0 +1,3 @@
1
+ # [ 3 ]
2
+ # POSTEXE
3
+ END { }
data/test/data/for1.rb ADDED
@@ -0,0 +1,4 @@
1
+ # [ 2, 3 ]
2
+ for i in [2]
3
+ i
4
+ end
data/test/data/if1.rb ADDED
@@ -0,0 +1,4 @@
1
+ # [ 2, 2 ]
2
+ x = true ? 1 : 2
3
+
4
+
data/test/data/if2.rb ADDED
@@ -0,0 +1,4 @@
1
+ # [ 2, 2 ]
2
+ x = 2 if false
3
+
4
+
data/test/data/if3.rb ADDED
@@ -0,0 +1,9 @@
1
+ # [ 2, 3, 4, 4, 5, 6]
2
+ lines = ''
3
+ opts = {:print_source => true}
4
+ if opts[:print_source]
5
+ puts 5
6
+ puts lines
7
+ end
8
+
9
+
data/test/data/if4.rb ADDED
@@ -0,0 +1,14 @@
1
+ # [ 6, 7, 7, 10, 8]
2
+
3
+ # Running through Tracer will not give the line numbers in the same
4
+ # order. Also note 9 before 7. This is because in the parse tree
5
+ # != has been turned into == with the branches switched.
6
+ [true, false].each do |t|
7
+ if t != true
8
+ 8
9
+ else
10
+ 10
11
+ end
12
+ end
13
+
14
+
data/test/data/if5.rb ADDED
@@ -0,0 +1,7 @@
1
+ # [2, 4, 4]
2
+ x=2
3
+ x=3 if x='a' or
4
+ false
5
+ # What's weird here is we get two stops on line 4 and both times x is
6
+ # 4. In Ruby 1.9 we don't get *any* line traces.
7
+
data/test/data/if6.rb ADDED
@@ -0,0 +1,4 @@
1
+ # [ 2, 2 ]
2
+ x = 2 if x=3
3
+
4
+
data/test/data/if7.rb ADDED
@@ -0,0 +1,8 @@
1
+ # [ 2, 3, 4, 6, 6 ]
2
+ def f()
3
+ y=1
4
+ true
5
+ end
6
+ x = 2 if f()
7
+
8
+
@@ -0,0 +1,3 @@
1
+ # [ 3 ]
2
+ # MATCH -- FIXME we are not getting a match token.
3
+ /.*/
@@ -0,0 +1,5 @@
1
+ # [ 5 ]
2
+ # MATCH3
3
+ 3 =~ /
4
+ x*
5
+ /
@@ -0,0 +1,6 @@
1
+ # [ 3, 6 ]
2
+ # MATCH3
3
+ y = 3
4
+ 4 =~ /
5
+ #{y}*
6
+ /
@@ -0,0 +1,6 @@
1
+ # [ 4, 6 ]
2
+ # not and lit
3
+ 3
4
+ not 4
5
+ not
6
+ 6
metadata CHANGED
@@ -1,33 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: linecache
5
3
  version: !ruby/object:Gem::Version
6
- version: "0.4"
7
- date: 2008-04-10 00:00:00 -04:00
8
- summary: Read file with caching
9
- require_paths:
10
- - lib
11
- email: rockyb@rubyforge.net
12
- homepage: http://rubyforge.org/projects/rocky-hacks/linecache
13
- rubyforge_project: rocky-hacks
14
- description: LineCache is a module for reading and caching lines. This may be useful for example in a debugger where the same lines are shown many times.
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.8.2
24
- version:
4
+ version: "0.41"
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - R. Bernstein
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-04-10 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: LineCache is a module for reading and caching lines. This may be useful for example in a debugger where the same lines are shown many times.
17
+ email: rockyb@rubyforge.net
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
24
+ - lib/linecache.rb
25
+ - lib/tracelines.rb
31
26
  files:
32
27
  - AUTHORS
33
28
  - COPYING
@@ -36,33 +31,72 @@ files:
36
31
  - README
37
32
  - Rakefile
38
33
  - VERSION
39
- - ext/trace_nums.o
40
- - ext/trace_nums.so
41
34
  - ext/trace_nums.c
42
35
  - ext/trace_nums.h
36
+ - ext/trace_nums.o
37
+ - ext/trace_nums.so
43
38
  - ext/extconf.rb
44
- - lib/tracelines.rb
45
39
  - lib/linecache.rb
40
+ - lib/tracelines.rb
41
+ - test/test-linecache.rb
46
42
  - test/rcov-bug.rb
47
43
  - test/test-tracelines.rb
48
44
  - test/test-lnum.rb
49
- - test/test-linecache.rb
50
45
  - test/parse-show.rb
51
46
  - test/lnum-diag.rb
47
+ - test/data/def1.rb
48
+ - test/data/if1.rb
49
+ - test/data/match3.rb
50
+ - test/data/if2.rb
51
+ - test/data/match3a.rb
52
+ - test/data/each1.rb
53
+ - test/data/if3.rb
54
+ - test/data/if4.rb
55
+ - test/data/if5.rb
56
+ - test/data/class1.rb
57
+ - test/data/not-lit.rb
58
+ - test/data/case1.rb
59
+ - test/data/match.rb
60
+ - test/data/case2.rb
61
+ - test/data/case3.rb
62
+ - test/data/case4.rb
63
+ - test/data/case5.rb
64
+ - test/data/begin1.rb
65
+ - test/data/end.rb
66
+ - test/data/comments1.rb
67
+ - test/data/begin2.rb
68
+ - test/data/for1.rb
69
+ - test/data/begin3.rb
70
+ - test/data/block1.rb
71
+ - test/data/block2.rb
72
+ - test/data/if6.rb
73
+ - test/data/if7.rb
52
74
  - test/short-file
53
- test_files: []
54
-
75
+ has_rdoc: true
76
+ homepage: http://rubyforge.org/projects/rocky-hacks/linecache
77
+ post_install_message:
55
78
  rdoc_options: []
56
79
 
57
- extra_rdoc_files:
58
- - README
59
- - lib/linecache.rb
60
- - lib/tracelines.rb
61
- executables: []
62
-
63
- extensions: []
64
-
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 1.8.2
87
+ version:
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: "0"
93
+ version:
65
94
  requirements: []
66
95
 
67
- dependencies: []
96
+ rubyforge_project: rocky-hacks
97
+ rubygems_version: 1.0.1
98
+ signing_key:
99
+ specification_version: 2
100
+ summary: Read file with caching
101
+ test_files: []
68
102