testhelper 1.1.0 → 1.2.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/file_line.rb +4 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91cc0f760cea80a25646e000ac11a95056d4c6e2
4
- data.tar.gz: bdfe8efd5174858af2c39fd67ad54a0d31a245f2
3
+ metadata.gz: 0bf0cae1169633e3f64f27c24ea2b0ca5cbdfe4d
4
+ data.tar.gz: f7fa0a3bd15e41005fbe7e88e6958ffaadaf3da8
5
5
  SHA512:
6
- metadata.gz: 7c306457ece7553c519058735fa83de452dc017bbc54731b9d4439b45c85d615cf29f4a53f4d880478fd687455df5454382d3c92ae593dc27944b88d7be08c4e
7
- data.tar.gz: 3b096f6f4011b5304e59d7bccf90490bfd9dd75dc69d94cc56c7ec71a34da46e820d2d7d7365201848615013b1dd6947fb0b60895a3bbf04ba1d3b5f366ab077
6
+ metadata.gz: 9f04df9b09ae7e2c3cac83f4601746a7901aac4eee7be71f4cc60ecefeb0ac8254adf5918cfe838151f9b83aa44c037fc2af58d0d0087afd28d7400242a5d44a
7
+ data.tar.gz: c65574600fa15c6db473118723593cd4836a6ec98b4f2ef57b719cf0da5b9deaefdbdf68e98db92cbe5ccf9b3c0f487a6ff4c14971a9ab90572377268eb3634c
@@ -11,7 +11,10 @@ module FileLine
11
11
  def self.get(file_path, line_no)
12
12
  # only test for Pry::VERSION == 0.10.0
13
13
  if file_path == "(pry)"
14
- return Pry.history.to_a[-1]
14
+ return Pry.history.to_a.last
15
+ end
16
+ if file_path == "(irb)"
17
+ return Readline::HISTORY.to_a.last
15
18
  end
16
19
  open(file_path) do |f|
17
20
  # tap depend on ruby > 1.9
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testhelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Ji
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-15 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Some print helper methods like pt, ptl, ppt, pptl, flag_test for testing.
14
14
  email: jichen3000@gmail.com