rbx-linecache 1.1-universal-rubinius-1.2 → 1.2-universal-rubinius-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.
- data/ChangeLog +26 -0
- data/NEWS +4 -0
- data/lib/linecache.rb +20 -7
- metadata +5 -5
data/ChangeLog
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
2011-03-12 12:06 Rocky Bernstein
|
|
2
|
+
|
|
3
|
+
* lib/linecache.rb: Wasn't accessing compiled_method right
|
|
4
|
+
|
|
5
|
+
2011-03-12 04:21 Rocky Bernstein
|
|
6
|
+
|
|
7
|
+
* lib/linecache.rb: Compiled method fix again
|
|
8
|
+
|
|
9
|
+
2011-03-12 03:29 Rocky Bernstein
|
|
10
|
+
|
|
11
|
+
* lib/linecache.rb: Save compiled method if given
|
|
12
|
+
|
|
13
|
+
2011-03-12 01:02 Rocky Bernstein
|
|
14
|
+
|
|
15
|
+
* lib/linecache.rb: Add slot for a compiled method
|
|
16
|
+
|
|
17
|
+
2011-02-23 14:59 Rocky Bernstein
|
|
18
|
+
|
|
19
|
+
* release-1.1: Tag Release 1.1
|
|
20
|
+
|
|
21
|
+
2011-02-23 14:58 Rocky Bernstein
|
|
22
|
+
|
|
23
|
+
* .gemspec, ChangeLog, NEWS, Rakefile, lib/linecache.rb,
|
|
24
|
+
rbx-linecache.gemspec: minor revision to description and to
|
|
25
|
+
tolerate all Rubinius 1.2.x versions; Get ready for 1.1 release
|
|
26
|
+
|
|
1
27
|
2011-02-11 21:47 Rocky Bernstein
|
|
2
28
|
|
|
3
29
|
* Rakefile: Adding --verbose to test/unit has changed over the
|
data/NEWS
CHANGED
data/lib/linecache.rb
CHANGED
|
@@ -64,8 +64,9 @@ require_relative 'tracelines'
|
|
|
64
64
|
# = module LineCache
|
|
65
65
|
# A module to read and cache lines of a Ruby program.
|
|
66
66
|
module LineCache
|
|
67
|
-
VERSION = '1.
|
|
68
|
-
LineCacheInfo = Struct.new(:stat, :line_numbers, :lines, :path,
|
|
67
|
+
VERSION = '1.2'
|
|
68
|
+
LineCacheInfo = Struct.new(:stat, :line_numbers, :lines, :path,
|
|
69
|
+
:sha1, :compiled_method) unless
|
|
69
70
|
defined?(LineCacheInfo)
|
|
70
71
|
|
|
71
72
|
# The file cache. The key is a name as would be given by Ruby for
|
|
@@ -328,8 +329,9 @@ module LineCache
|
|
|
328
329
|
@@file_cache[filename].path
|
|
329
330
|
end
|
|
330
331
|
|
|
331
|
-
def remap_file(
|
|
332
|
-
@@file2file_remap[
|
|
332
|
+
def remap_file(from_file, to_file)
|
|
333
|
+
@@file2file_remap[from_file] = to_file
|
|
334
|
+
cache_file(to_file)
|
|
333
335
|
end
|
|
334
336
|
|
|
335
337
|
def remap_file_lines(from_file, to_file, range, start)
|
|
@@ -345,6 +347,15 @@ module LineCache
|
|
|
345
347
|
end
|
|
346
348
|
module_function :remap_file_lines
|
|
347
349
|
|
|
350
|
+
# Return any compiled method saved for a filename.
|
|
351
|
+
def compiled_method(filename)
|
|
352
|
+
if (file = map_file(filename)) && @@file_cache[file]
|
|
353
|
+
return @@file_cache[file].compiled_method
|
|
354
|
+
else
|
|
355
|
+
return nil
|
|
356
|
+
end
|
|
357
|
+
end
|
|
358
|
+
|
|
348
359
|
# Return SHA1 of filename.
|
|
349
360
|
def sha1(filename)
|
|
350
361
|
filename = map_file(filename)
|
|
@@ -441,7 +452,8 @@ module LineCache
|
|
|
441
452
|
lines[opts[:output]] = highlight_string(string, opts[:output]) if
|
|
442
453
|
opts[:output]
|
|
443
454
|
@@script_cache[script] =
|
|
444
|
-
LineCacheInfo.new(nil, nil, lines, nil, opts[:sha1]
|
|
455
|
+
LineCacheInfo.new(nil, nil, lines, nil, opts[:sha1],
|
|
456
|
+
opts[:compiled_method])
|
|
445
457
|
return true
|
|
446
458
|
end
|
|
447
459
|
|
|
@@ -482,8 +494,9 @@ module LineCache
|
|
|
482
494
|
## print '*** cannot open', path, ':', msg
|
|
483
495
|
return nil
|
|
484
496
|
end
|
|
485
|
-
@@file_cache[filename] =
|
|
486
|
-
|
|
497
|
+
@@file_cache[filename] =
|
|
498
|
+
LineCacheInfo.new(File.stat(path), nil, lines, path, nil,
|
|
499
|
+
opts[:compiled_method])
|
|
487
500
|
@@file2file_remap[path] = filename
|
|
488
501
|
return true
|
|
489
502
|
end
|
metadata
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbx-linecache
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 11
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
9
|
-
version: "1.
|
|
8
|
+
- 2
|
|
9
|
+
version: "1.2"
|
|
10
10
|
platform: universal-rubinius-1.2
|
|
11
11
|
authors:
|
|
12
12
|
- R. Bernstein
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2011-
|
|
17
|
+
date: 2011-03-15 00:00:00 -04:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
@@ -99,7 +99,7 @@ licenses:
|
|
|
99
99
|
post_install_message:
|
|
100
100
|
rdoc_options:
|
|
101
101
|
- --title
|
|
102
|
-
- LineCache 1.
|
|
102
|
+
- LineCache 1.2 Documentation
|
|
103
103
|
require_paths:
|
|
104
104
|
- lib
|
|
105
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|