rblineprof-report 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f270188e64b279d4858c568661944b72a310717d
4
- data.tar.gz: 5b5df213de90199286ed51e01a29f44a133c1a82
3
+ metadata.gz: 3768e906e3d72f26780b5fbfc53e2d2b1979973d
4
+ data.tar.gz: 549230e9fd41484c30f6238cc3aaf612c6eb0de6
5
5
  SHA512:
6
- metadata.gz: 460a97dcbd1bf1b9fbada368de75df05098fc6438b8e1bad504a138cb1c5130acd8670849350b32e2cc3bebdf76092aa2f81f263615bd33fc12b0fda019b1318
7
- data.tar.gz: 5becd220992312d374387b541f3f8b63cd96416c64ecc03c527159cc8bfc981c8e828429f4fc54d728302a557d1ac7bedce507d0752d0fa1ab3b856037755ef2
6
+ metadata.gz: e94ea4ec548a9b64b2abb70523bfc1f786fc4e8dfca1e0fdc80cadeadf1d95825fa9df8ca9d125ee852c712e9d255dabf4899020e6882f092b720d1c3b976e08
7
+ data.tar.gz: 32caea4097589ff03204323caffb6fd237be94a4c45143abb76da25017b96104c36eb23ced000e48670eb721b7b17264745d3b440d8b3d5548b21d5f730514c2
@@ -57,7 +57,12 @@ module LineProf
57
57
  end
58
58
 
59
59
  def source_lines
60
- @source_lines ||= ::File.open(file_name, 'r').to_a
60
+ if File.exist?(file_name)
61
+ @source_lines ||= ::File.readlines(file_name)
62
+ else
63
+ $stderr.puts "LineProf::Report::Source: #{file_name} is not found"
64
+ @source_lines ||= []
65
+ end
61
66
  end
62
67
 
63
68
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rblineprof-report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo