rbx-linecache 1.3-universal-rubinius-2.0 → 1.4-universal-rubinius-2.0

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS CHANGED
@@ -1,3 +1,6 @@
1
+ 1.4
2
+ - static_scope -> constant_scope to rubinius 2.0.rc1
3
+
1
4
  1.3
2
5
  - CompiledMethod#lines tuple changes and allow rubinius 2.0.pre
3
6
 
@@ -16,14 +19,14 @@ December 25, 2010
16
19
  - Handle Rubinius eval_source to temp file remapping.
17
20
 
18
21
  October 27, 2010
19
- - First gemcutter rubinius release
22
+ - First gemcutter rubinius release
20
23
 
21
24
 
22
25
  0.43
23
26
  06-12-08
24
27
  - tolerance for finding windows extension in lib rather than ext.
25
28
 
26
- 0.41
29
+ 0.41
27
30
  - add test/data/* to gem.
28
31
 
29
32
  0.4
@@ -32,18 +35,17 @@ October 27, 2010
32
35
  0.3
33
36
  - Add tracelines: get line numbers that can be stopped at.
34
37
 
35
- - Add routines to allow line-number
36
- remapping and filename remapping.
38
+ - Add routines to allow line-number
39
+ remapping and filename remapping.
37
40
 
38
41
  - Add access methods to get the number of lines in a file.
39
42
 
40
43
  0.2
41
44
  - Make this work with ruby-debug-base. Add reload-on-change parameters.
42
- add checkcache, cache, cached? sha1, and stat methods.
43
-
45
+ add checkcache, cache, cached? sha1, and stat methods.
46
+
44
47
  - Use SCRIPT_LINES__.
45
48
 
46
49
  0.1
47
50
 
48
51
  - Initial release of LineCache, a module for reading and caching lines.
49
-
data/README CHANGED
@@ -1,6 +1,4 @@
1
- = LineCache - A module to read and cache file information of a Ruby program.
2
-
3
- == SYNOPSIS
1
+ ## LineCache - A module to read and cache file information of a Ruby program.
4
2
 
5
3
  The LineCache module allows one to get any line from any file, caching
6
4
  the lines and file information on first access to the file. Although
@@ -12,39 +10,37 @@ The routines here may be is useful when a small random sets of lines
12
10
  are read from a single file, in particular in a debugger to show
13
11
  source lines.
14
12
 
15
- == Summary
13
+ ## Summary
16
14
 
17
- require 'linecache'
18
- lines = LineCache::getlines('/tmp/myruby.rb')
19
- # The following lines have same effect as the above.
20
- $: << '/tmp'
21
- Dir.chdir('/tmp') {lines = LineCache::getlines('myruby.rb')
15
+ require 'linecache'
16
+ lines = LineCache::getlines('/tmp/myruby.rb')
17
+ # The following lines have same effect as the above.
18
+ $: << '/tmp'
19
+ Dir.chdir('/tmp') {lines = LineCache::getlines('myruby.rb')
22
20
 
23
- line = LineCache::getline('/tmp/myruby.rb', 6)
24
- # Note lines[6] == line (if /tmp/myruby.rb has 6 lines)
21
+ line = LineCache::getline('/tmp/myruby.rb', 6)
22
+ # Note lines[6] == line (if /tmp/myruby.rb has 6 lines)
25
23
 
26
- LineCache::clear_file_cache
27
- LineCache::clear_file_cache('/tmp/myruby.rb')
28
- LineCache::update_cache # Check for modifications of all cached files.
24
+ LineCache::clear_file_cache
25
+ LineCache::clear_file_cache('/tmp/myruby.rb')
26
+ LineCache::update_cache # Check for modifications of all cached files.
29
27
 
30
- == Credits
28
+ ## Credits
31
29
 
32
30
  This is a port of the module of the same name from the Python distribution.
33
31
 
34
32
  The idea for how TraceLineNumbers works, and some code was taken
35
33
  from ParseTree by Ryan Davis.
36
34
 
37
- == Other stuff
35
+ ## Other stuff
38
36
 
39
37
  Author:: Rocky Bernstein <rockyb@rubyforge.net>
40
- License:: Copyright (c) 2007, 2008 Rocky Bernstein
38
+ License:: Copyright (c) 2007, 2008, 2013 Rocky Bernstein
41
39
  Released under the GNU GPL 2 license
42
40
 
43
- == Warranty
41
+ ## Warranty
44
42
 
45
43
  This program is distributed in the hope that it will be useful,
46
44
  but WITHOUT ANY WARRANTY; without even the implied warranty of
47
45
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48
46
  GNU General Public License for more details.
49
-
50
- $Id: README 169 2009-02-08 17:19:33Z rockyb $
data/Rakefile CHANGED
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env rake
2
- # Are we Rubinius? The right versions of it?
3
- raise RuntimeError,
2
+ # -*- Ruby -*-
3
+ # Are we Rubinius? The right versions of it?
4
+ raise RuntimeError,
4
5
  'This package is for Rubinius 1.2.[34] or 2.0.x only!' unless
5
- Object.constants.include?('Rubinius') &&
6
- Rubinius.constants.include?('VM') &&
6
+ Object.constants.include?('Rubinius') &&
7
+ Rubinius.constants.include?('VM') &&
7
8
  Rubinius::VERSION =~ /1\.2\.[34]/ || Rubinius::VERSION =~ /2\.0/
8
9
 
9
10
  require 'rubygems'
10
- require 'rubygems/package_task'
11
- require 'rdoc/task'
12
- require 'rake/testtask'
13
11
 
14
12
  ROOT_DIR = File.dirname(__FILE__)
15
13
  Gemspec_filename = 'rbx-linecache.gemspec'
@@ -19,13 +17,14 @@ def gemspec
19
17
  @gemspec ||= eval(File.read(Gemspec_filename), binding, Gemspec_filename)
20
18
  end
21
19
 
20
+ require 'rubygems/package_task'
22
21
  desc "Build the gem"
23
22
  task :package=>:gem
24
23
  task :gem=>:gemspec do
25
24
  Dir.chdir(ROOT_DIR) do
26
25
  sh "gem build #{Gemspec_filename}"
27
26
  FileUtils.mkdir_p 'pkg'
28
- FileUtils.mv("#{gemspec.file_name}", "pkg/")
27
+ FileUtils.mv gemspec.file_name, 'pkg'
29
28
 
30
29
  # Now make a 2.0 package by changing 1.2 to 2.0 in the gemspec
31
30
  # and creating another gemspec and moving that accordingly
@@ -43,18 +42,55 @@ task :gem=>:gemspec do
43
42
  end
44
43
  end
45
44
 
46
- task :default => [:test]
47
-
48
45
  desc 'Install the gem locally'
49
- task :install => :package do
46
+ task :install => :gem do
50
47
  Dir.chdir(ROOT_DIR) do
51
48
  sh %{gem install --local pkg/#{gemspec.file_name}}
52
49
  end
53
- end
50
+ end
51
+
52
+ require 'rake/testtask'
53
+ desc "Test everything."
54
+ Rake::TestTask.new(:test) do |t|
55
+ t.libs << './lib'
56
+ t.pattern = 'test/test-*.rb'
57
+ t.verbose = true
58
+ end
59
+ task :test => :lib
60
+
61
+ desc "same as test"
62
+ task :check => :test
63
+
64
+ require 'rbconfig'
65
+ def RbConfig.ruby
66
+ File.join(RbConfig::CONFIG['bindir'],
67
+ RbConfig::CONFIG['RUBY_INSTALL_NAME'] +
68
+ RbConfig::CONFIG['EXEEXT'])
69
+ end unless defined? RbConfig.ruby
70
+
71
+ def run_standalone_ruby_files(list, opts={})
72
+ puts '*' * 40
73
+ list.each do |ruby_file|
74
+ system(RbConfig.ruby, ruby_file)
75
+ p $?.exitstatus
76
+ break if $?.exitstatus != 0 && !opts[:continue]
77
+ end
78
+ end
54
79
 
55
- desc "Create a GNU-style ChangeLog via svn2cl"
80
+ def run_standalone_ruby_file(directory, opts={})
81
+ puts(('*' * 10) + ' ' + directory + ' ' + ('*' * 10))
82
+ Dir.chdir(directory) do
83
+ Dir.glob('*.rb').each do |ruby_file|
84
+ puts(('-' * 20) + ' ' + ruby_file + ' ' + ('-' * 20))
85
+ system(RbConfig.ruby, ruby_file)
86
+ break if $?.exitstatus != 0 && !opts[:continue]
87
+ end
88
+ end
89
+ end
90
+
91
+ desc 'Create a GNU-style ChangeLog via git2cl'
56
92
  task :ChangeLog do
57
- system("svn2cl --authors=svn2cl_usermap")
93
+ system('git log --pretty --numstat --summary | git2cl > ChangeLog')
58
94
  end
59
95
 
60
96
  desc 'Test units - the smaller tests'
@@ -64,17 +100,21 @@ Rake::TestTask.new(:'test') do |t|
64
100
  t.options = '--verbose' if $VERBOSE
65
101
  end
66
102
 
103
+ desc "Default action is same as 'test'."
104
+ task :default => :test
105
+
67
106
  desc "Generate the gemspec"
68
107
  task :generate do
69
108
  puts gemspec.to_ruby
70
109
  end
71
110
 
72
- desc "Validate the gemspec"
111
+ desc 'Validate the gemspec'
73
112
  task :gemspec do
74
113
  gemspec.validate
75
114
  end
76
115
 
77
116
  # --------- RDoc Documentation ------
117
+ require 'rdoc/task'
78
118
  desc "Generate rdoc documentation"
79
119
  Rake::RDocTask.new("rdoc") do |rdoc|
80
120
  rdoc.rdoc_dir = 'doc'
@@ -82,16 +122,27 @@ Rake::RDocTask.new("rdoc") do |rdoc|
82
122
  rdoc.rdoc_files.include(%w(lib/*.rb))
83
123
  end
84
124
 
85
- desc "Same as rdoc"
125
+ desc 'Same as rdoc'
86
126
  task :doc => :rdoc
87
127
 
88
128
  task :clobber_package do
89
- FileUtils.rm_rf File.join(ROOT_DIR, 'pkg')
129
+ FileUtils.rm_rf File.join(ROOT_DIR, 'pkg'), :verbose => true
90
130
  end
91
131
 
92
132
  task :clobber_rdoc do
93
- FileUtils.rm_rf File.join(ROOT_DIR, 'doc')
133
+ FileUtils.rm_rf File.join(ROOT_DIR, 'doc'), :verbose => true
134
+ end
135
+
136
+ desc 'Remove residue from running patch'
137
+ task :rm_patch_residue do
138
+ FileUtils.rm_rf Dir.glob('**/*.{rej,orig}'), :verbose => true
139
+ end
140
+
141
+ desc 'Remove ~ backup files'
142
+ task :rm_tilde_backups do
143
+ FileUtils.rm_rf Dir.glob('**/*~'), :verbose => true
94
144
  end
95
145
 
96
- desc "Remove built files"
97
- task :clean => [:clobber_package, :clobber_rdoc]
146
+ desc 'Remove built files'
147
+ task :clean => [:clobber_package, :clobber_rdoc, :rm_patch_residue,
148
+ :rm_tilde_backups]
@@ -21,12 +21,12 @@
21
21
  # Author:: Rocky Bernstein (mailto:rockyb@rubyforge.net)
22
22
  #
23
23
  # = linecache
24
- # A module to read and cache lines of a Ruby program.
24
+ # A module to read and cache lines of a Ruby program.
25
25
 
26
26
  # == SYNOPSIS
27
27
  #
28
28
  # The LineCache module allows one to get any line from any file,
29
- # caching lines of the file on first access to the file. Although the
29
+ # caching lines of the file on first access to the file. Although the
30
30
  # file may be any file, the common use is when the file is a Ruby
31
31
  # script since parsing of the file is done to figure out where the
32
32
  # statement boundaries are.
@@ -62,22 +62,22 @@ require 'require_relative'
62
62
  require_relative 'tracelines'
63
63
 
64
64
  # = module LineCache
65
- # A module to read and cache lines of a Ruby program.
65
+ # A module to read and cache lines of a Ruby program.
66
66
  module LineCache
67
- VERSION = '1.3'
68
- LineCacheInfo = Struct.new(:stat, :line_numbers, :lines, :path,
67
+ VERSION = '1.4'
68
+ LineCacheInfo = Struct.new(:stat, :line_numbers, :lines, :path,
69
69
  :sha1, :compiled_method) unless
70
70
  defined?(LineCacheInfo)
71
-
72
- # The file cache. The key is a name as would be given by Ruby for
73
- # __FILE__. The value is a LineCacheInfo object.
74
- @@file_cache = {}
75
- @@script_cache = {}
71
+
72
+ # The file cache. The key is a name as would be given by Ruby for
73
+ # __FILE__. The value is a LineCacheInfo object.
74
+ @@file_cache = {}
75
+ @@script_cache = {}
76
76
 
77
77
 
78
78
  # Used for CodeRay syntax highlighting
79
79
  @@ruby_highlighter = nil
80
-
80
+
81
81
  # Maps a string filename (a String) to a key in @@file_cache (a
82
82
  # String).
83
83
  #
@@ -90,10 +90,10 @@ module LineCache
90
90
  # Another related use is when a template system is used. Here we'll
91
91
  # probably want to remap not only the file name but also line
92
92
  # ranges. Will probably use this for that, but I'm not sure.
93
- @@file2file_remap = {}
93
+ @@file2file_remap = {}
94
94
  @@file2file_remap_lines = {}
95
95
 
96
- @@script2file = {}
96
+ @@script2file = {}
97
97
 
98
98
  module_function
99
99
 
@@ -104,10 +104,10 @@ module LineCache
104
104
  end
105
105
  at_exit { remove_script_temps }
106
106
 
107
-
107
+
108
108
  # Clear the file cache entirely.
109
109
  def clear_file_cache(filename=nil)
110
- if filename
110
+ if filename
111
111
  if @@file_cache[filename]
112
112
  @@file_cache.delete(filename)
113
113
  end
@@ -120,7 +120,7 @@ module LineCache
120
120
 
121
121
  # Remove syntax-formatted lines in the cache. Use this
122
122
  # when you change the CodeRay syntax or Token formatting
123
- # and want to redo how files may have previously been
123
+ # and want to redo how files may have previously been
124
124
  # syntax marked.
125
125
  def clear_file_format_cache
126
126
  @@file_cache.each_pair do |fname, cache_info|
@@ -165,7 +165,7 @@ module LineCache
165
165
  cache_info = @@file_cache[filename].stat
166
166
  stat = File.stat(path)
167
167
  if cache_info
168
- if stat &&
168
+ if stat &&
169
169
  (cache_info.size != stat.size or cache_info.mtime != stat.mtime)
170
170
  result << filename
171
171
  update_cache(filename, opts)
@@ -214,12 +214,12 @@ module LineCache
214
214
  nil
215
215
  end
216
216
  end
217
-
217
+
218
218
  # Return true if file_or_script is cached
219
219
  def cached?(file_or_script)
220
- if file_or_script.kind_of?(String)
220
+ if file_or_script.kind_of?(String)
221
221
  @@file_cache.member?(map_file(file_or_script))
222
- else
222
+ else
223
223
  cached_script?(file_or_script)
224
224
  end
225
225
  end
@@ -227,7 +227,7 @@ module LineCache
227
227
  def cached_script?(script)
228
228
  @@script_cache.member?(script)
229
229
  end
230
-
230
+
231
231
  def empty?(filename)
232
232
  filename=map_file(filename)
233
233
  !!@@file_cache[filename].lines[:plain]
@@ -236,16 +236,16 @@ module LineCache
236
236
  # Get line +line_number+ from file named +filename+. Return nil if
237
237
  # there was a problem. If a file named filename is not found, the
238
238
  # function will look for it in the $: array.
239
- #
239
+ #
240
240
  # Examples:
241
- #
241
+ #
242
242
  # lines = LineCache::getline('/tmp/myfile.rb')
243
243
  # # Same as above
244
244
  # $: << '/tmp'
245
245
  # lines = LineCache.getlines('myfile.rb')
246
246
  #
247
247
  def getline(file_or_script, line_number, opts={})
248
- lines =
248
+ lines =
249
249
  if file_or_script.kind_of?(String)
250
250
  filename = map_file(file_or_script)
251
251
  filename, line_number = map_file_line(filename, line_number)
@@ -265,7 +265,7 @@ module LineCache
265
265
  # if we can't get lines
266
266
  def script_getlines(script, opts={})
267
267
  format = opts[:output] || :plain
268
- line_formats =
268
+ line_formats =
269
269
  if @@script_cache.member?(script)
270
270
  @@script_cache[script].lines
271
271
  else
@@ -294,7 +294,7 @@ module LineCache
294
294
  if @@file_cache.member?(filename)
295
295
  lines = @@file_cache[filename].lines
296
296
  if opts[:output] && !lines[format]
297
- lines[format] =
297
+ lines[format] =
298
298
  highlight_string(lines[:plain].join(''), format).split(/\n/)
299
299
  end
300
300
  return lines[format]
@@ -337,7 +337,7 @@ module LineCache
337
337
  def remap_file_lines(from_file, to_file, range, start)
338
338
  range = (range..range) if range.kind_of?(Fixnum)
339
339
  to_file = from_file unless to_file
340
- if @@file2file_remap_lines[to_file]
340
+ if @@file2file_remap_lines[to_file]
341
341
  # FIXME: need to check for overwriting ranges: whether
342
342
  # they intersect or one encompasses another.
343
343
  @@file2file_remap_lines[to_file] << [from_file, range, start]
@@ -346,11 +346,11 @@ module LineCache
346
346
  end
347
347
  end
348
348
  module_function :remap_file_lines
349
-
349
+
350
350
  # Return any compiled method saved for a filename.
351
351
  def compiled_method(filename)
352
352
  if (file = map_file(filename)) && @@file_cache[file]
353
- return @@file_cache[file].compiled_method
353
+ return @@file_cache[file].compiled_method
354
354
  else
355
355
  return nil
356
356
  end
@@ -360,7 +360,7 @@ module LineCache
360
360
  def sha1(filename)
361
361
  filename = map_file(filename)
362
362
  return nil unless @@file_cache.member?(filename)
363
- return @@file_cache[filename].sha1.hexdigest if
363
+ return @@file_cache[filename].sha1.hexdigest if
364
364
  @@file_cache[filename].sha1
365
365
  sha1 = Digest::SHA1.new
366
366
  @@file_cache[filename].lines[:plain].each do |line|
@@ -369,7 +369,7 @@ module LineCache
369
369
  @@file_cache[filename].sha1 = sha1
370
370
  sha1.hexdigest
371
371
  end
372
-
372
+
373
373
  # Return the number of lines in filename
374
374
  def size(file_or_script)
375
375
  cache(file_or_script)
@@ -399,21 +399,21 @@ module LineCache
399
399
  return nil unless fullname
400
400
  e = @@file_cache[filename]
401
401
  unless e.line_numbers
402
- e.line_numbers =
402
+ e.line_numbers =
403
403
  TraceLineNumbers.lnums_for_str_array(e.lines[:plain])
404
404
  e.line_numbers = false unless e.line_numbers
405
405
  end
406
406
  e.line_numbers
407
407
  end
408
-
408
+
409
409
  def map_file(file)
410
410
  @@file2file_remap[file] ? @@file2file_remap[file] : file
411
411
  end
412
412
 
413
413
  def map_script(script)
414
- if @@script2file[script]
415
- @@script2file[script]
416
- else
414
+ if @@script2file[script]
415
+ @@script2file[script]
416
+ else
417
417
  # Doc says there's new takes an optional string parameter
418
418
  # But it doesn't work for me
419
419
  sha1 = Digest::SHA1.new
@@ -431,8 +431,8 @@ module LineCache
431
431
  if @@file2file_remap_lines[file]
432
432
  @@file2file_remap_lines[file].each do |from_file, range, start|
433
433
  if range === line
434
- from_file = from_file || file
435
- return [from_file, start+line-range.begin]
434
+ from_file = from_file || file
435
+ return [from_file, start+line-range.begin]
436
436
  end
437
437
  end
438
438
  end
@@ -444,15 +444,15 @@ module LineCache
444
444
  end
445
445
 
446
446
  # Update a cache entry. If something is wrong, return nil. Return
447
- # true if the cache was updated and false if not.
447
+ # true if the cache was updated and false if not.
448
448
  def update_script_cache(script, opts)
449
449
  return false unless script_is_eval?(script)
450
450
  string = opts[:string] || script.eval_source
451
451
  lines = {:plain => string.split(/\n/)}
452
452
  lines[opts[:output]] = highlight_string(string, opts[:output]) if
453
453
  opts[:output]
454
- @@script_cache[script] =
455
- LineCacheInfo.new(nil, nil, lines, nil, opts[:sha1],
454
+ @@script_cache[script] =
455
+ LineCacheInfo.new(nil, nil, lines, nil, opts[:sha1],
456
456
  opts[:compiled_method])
457
457
  return true
458
458
  end
@@ -466,7 +466,7 @@ module LineCache
466
466
 
467
467
  @@file_cache.delete(filename)
468
468
  path = File.expand_path(filename)
469
-
469
+
470
470
  if File.exist?(path)
471
471
  stat = File.stat(path)
472
472
  elsif File.basename(filename) == filename
@@ -487,15 +487,15 @@ module LineCache
487
487
  fp.rewind
488
488
  lines = {:plain => fp.readlines}
489
489
  fp.close()
490
- lines[opts[:output]] =
491
- highlight_string(raw_string, opts[:output]).split(/\n/) if
490
+ lines[opts[:output]] =
491
+ highlight_string(raw_string, opts[:output]).split(/\n/) if
492
492
  opts[:output]
493
- rescue
493
+ rescue
494
494
  ## print '*** cannot open', path, ':', msg
495
495
  return nil
496
496
  end
497
- @@file_cache[filename] =
498
- LineCacheInfo.new(File.stat(path), nil, lines, path, nil,
497
+ @@file_cache[filename] =
498
+ LineCacheInfo.new(File.stat(path), nil, lines, path, nil,
499
499
  opts[:compiled_method])
500
500
  @@file2file_remap[path] = filename
501
501
  return true
@@ -503,15 +503,15 @@ module LineCache
503
503
  end
504
504
 
505
505
  # example usage
506
- if __FILE__ == $0
507
- def yes_no(var)
506
+ if __FILE__ == $0
507
+ def yes_no(var)
508
508
  return var ? "" : "not "
509
509
  end
510
510
 
511
511
  lines = LineCache::getlines(__FILE__)
512
512
  puts "#{__FILE__} has #{LineCache.size(__FILE__)} lines"
513
513
  line = LineCache::getline(__FILE__, 6)
514
- puts "The 6th line is\n#{line}"
514
+ puts "The 6th line is\n#{line}"
515
515
  line = LineCache::remap_file(__FILE__, 'another_name')
516
516
  puts LineCache::getline('another_name', 7)
517
517
 
@@ -519,23 +519,23 @@ if __FILE__ == $0
519
519
  LineCache::update_cache(__FILE__)
520
520
  LineCache::checkcache(__FILE__)
521
521
  puts "#{__FILE__} has #{LineCache::size(__FILE__)} lines"
522
- puts "#{__FILE__} trace line numbers:\n" +
522
+ puts "#{__FILE__} trace line numbers:\n" +
523
523
  "#{LineCache::trace_line_numbers(__FILE__).to_a.sort.inspect}"
524
- puts("#{__FILE__} is %scached." %
524
+ puts("#{__FILE__} is %scached." %
525
525
  yes_no(LineCache::cached?(__FILE__)))
526
526
  puts LineCache::stat(__FILE__).inspect
527
527
  puts "Full path: #{LineCache::path(__FILE__)}"
528
528
  LineCache::checkcache # Check all files in the cache
529
- LineCache::clear_file_cache
530
- puts("#{__FILE__} is now %scached." %
529
+ LineCache::clear_file_cache
530
+ puts("#{__FILE__} is now %scached." %
531
531
  yes_no(LineCache::cached?(__FILE__)))
532
532
  # digest = SCRIPT_LINES__.select{|k,v| k =~ /digest.rb$/}
533
533
  # puts digest.first[0] if digest
534
534
  line = LineCache::getline(__FILE__, 7)
535
- puts "The 7th line is\n#{line}"
535
+ puts "The 7th line is\n#{line}"
536
536
  LineCache::remap_file_lines(__FILE__, 'test2', (10..20), 6)
537
537
  puts LineCache::getline('test2', 10)
538
- puts "Remapped 10th line of test2 is\n#{line}"
538
+ puts "Remapped 10th line of test2 is\n#{line}"
539
539
  eval("loc = Rubinius::VM::backtrace(0)[0]
540
540
  puts LineCache::getline(loc.static_scope.script, 1)")
541
541
  eval("loc = Rubinius::VM::backtrace(0)[0]