pry 0.9.12.2 → 0.9.12.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: 756f052762e0cfcdb48ee305dfcd9955194f7f20
4
- data.tar.gz: e800d82f5f67f28b4c4f43102c0b1b830f00adbf
3
+ metadata.gz: 9020878e1e6aa2c4e5b308610654b2edf44c8e02
4
+ data.tar.gz: 191946162275d051ad96dc592fceb2bc91bda922
5
5
  SHA512:
6
- metadata.gz: d8d584c36a3044f8a6c54b22ca0c9da4ff47333188255053b2eefb7d0022a74c79f15a58de08e04d1697af72d7b05c1ce6b4c81335685317782733692c6791db
7
- data.tar.gz: 27c56725fbd399aa752669be340b011109c77c706cf2fc63cd239904fd841c779cb959716797abb797b195f4c149eb4a3ae3b014918f1ee28329aee70ef04d58
6
+ metadata.gz: 0feb6ccaae30cf98b90f199845874b9f45b648469dd057042fd3f37242c2aab14c426c7fe49b921d497b799d5b5e533d91541f02715732256bca862fb0d2219f
7
+ data.tar.gz: e984b5ace48af62e3e83392c273bd743d51a98ee0f117908161760619bef586dcf3dfc1bf8e5448c1bb5bab375a865f9b629ab72a281122a5fbe269b0ab4ffdd
@@ -45,7 +45,7 @@ class Pry::Pager
45
45
  break if chunk.size < page_size
46
46
  if text_array.size > page_size
47
47
  puts "\n<page break> --- Press enter to continue ( q<enter> to break ) --- <page break>"
48
- break if $stdin.gets.chomp == "q"
48
+ break if Readline.readline.chomp == "q"
49
49
  end
50
50
  end
51
51
  end
@@ -424,7 +424,9 @@ class Pry
424
424
 
425
425
  begin
426
426
  if !process_command(val, eval_string, target)
427
- eval_string << "#{indented_val.chomp}\n" unless val.empty?
427
+ unless [val, eval_string].all?(&:empty?)
428
+ eval_string << "#{indented_val.chomp}\n"
429
+ end
428
430
  end
429
431
  ensure
430
432
  Pry.history << indented_val if interactive
@@ -1,3 +1,3 @@
1
1
  class Pry
2
- VERSION = "0.9.12.2"
2
+ VERSION = "0.9.12.3"
3
3
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.files = `git ls-files`.split("\n")
17
17
  s.test_files = `git ls-files -- spec/*`.split("\n")
18
18
 
19
- s.add_dependency 'coderay', '~> 1.0.5'
19
+ s.add_dependency 'coderay', '~> 1.0'
20
20
  s.add_dependency 'slop', '~> 3.4'
21
21
  s.add_dependency 'method_source', '~> 0.8'
22
22
 
@@ -208,6 +208,17 @@ describe Pry do
208
208
 
209
209
  o.instance_variable_get(:@x).should == 10
210
210
  end
211
+
212
+ it 'should preserve newlines correctly with multi-line input' do
213
+ input_strings = ['@s = <<-END', '1', '', '', '2', 'END']
214
+ input = InputTester.new(*input_strings)
215
+
216
+ o = Object.new
217
+
218
+ pry_tester = Pry.start(o, :input => input, :output => StringIO.new)
219
+
220
+ o.instance_variable_get(:@s).should == "1\n\n\n2\n"
221
+ end
211
222
  end
212
223
 
213
224
  describe "complete_expression?" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.12.2
4
+ version: 0.9.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mair (banisterfiend)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-10 00:00:00.000000000 Z
13
+ date: 2013-11-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coderay
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.0.5
21
+ version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ~>
27
27
  - !ruby/object:Gem::Version
28
- version: 1.0.5
28
+ version: '1.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: slop
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -343,7 +343,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
343
343
  version: '0'
344
344
  requirements: []
345
345
  rubyforge_project:
346
- rubygems_version: 2.0.2
346
+ rubygems_version: 2.0.3
347
347
  signing_key:
348
348
  specification_version: 4
349
349
  summary: An IRB alternative and runtime developer console