pry 0.10.0.pre2 → 0.10.0.pre3

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: d9b02606903f8585fd610742fdd8197ff6b98caf
4
- data.tar.gz: 3e1e0ea3ba810ab87971dde215e3b51d07fe0171
3
+ metadata.gz: 4664289a3e2cd574bbac76c77f855ad21e7ba7a0
4
+ data.tar.gz: 52406d51797888fd40ad5d0f26c155d99a6337d8
5
5
  SHA512:
6
- metadata.gz: a5e31ad60d7d08edd36444058216c371fa1fc94f352422b07701855922637583449e455f1ea9fe81b5c997b74deb6e8fd4220891afa3791ad4e656ee7d29b6c7
7
- data.tar.gz: 10fffd23fa8c9336b3693c6dc60d7c8b4fb04d71b04e66d8cd864251afa99cbcd57a509bbbcad27765efa5ef039c6935a2a623c5adcdadae4f6d71c5ec74b026
6
+ metadata.gz: 4166f9d2710da02d57da497660ae79e0d6c58274a926d79798808bf34577cbd5daef54cc618330674df5aa36dfa50a9570410c814928d88cd7cc67af93736700
7
+ data.tar.gz: fd7151a78d78d731cf8cdd2e57d12240911de630da071079cdf66ff5ee067bcf67c59823b4accaf660854514696655d805cb139b2280fb13970a980bb32b89b8
data/lib/pry/code.rb CHANGED
@@ -253,12 +253,7 @@ class Pry
253
253
  # @return [String] a formatted representation (based on the configuration of
254
254
  # the object).
255
255
  def to_s
256
- print_to_output("", false)
257
- end
258
-
259
- # @return [String] a (possibly highlighted) copy of the source code.
260
- def highlighted
261
- print_to_output("", true)
256
+ print_to_output("")
262
257
  end
263
258
 
264
259
  # Writes a formatted representation (based on the configuration of the
@@ -266,7 +261,7 @@ class Pry
266
261
  def print_to_output(output, color=false)
267
262
  @lines.each do |loc|
268
263
  loc = loc.dup
269
- loc.colorize(@code_type) if color
264
+ loc.colorize(@code_type)
270
265
  loc.add_line_number(max_lineno_width, color) if @with_line_numbers
271
266
  loc.add_marker(@marker_lineno) if @with_marker
272
267
  loc.indent(@indentation_num) if @with_indentation
@@ -16,7 +16,7 @@ class Pry
16
16
  set_file_and_dir_locals(backtrace_file, _pry_, _pry_.current_context)
17
17
  code = decorate(Pry::Code.from_file(backtrace_file).
18
18
  between(*start_and_end_line_for_code_window).
19
- with_marker(backtrace_line)).to_s
19
+ with_marker(backtrace_line))
20
20
  "#{header}#{code}"
21
21
  end
22
22
 
@@ -20,7 +20,7 @@ class Pry
20
20
 
21
21
  content
22
22
  else
23
- decorate(Pry::Code(selected_input_items.first)).to_s
23
+ decorate(Pry::Code(selected_input_items.first))
24
24
  end
25
25
  end
26
26
 
@@ -40,7 +40,7 @@ class Pry
40
40
  # The source for code_object prepared for display.
41
41
  def content_for(code_object)
42
42
  Code.new(code_object.source, start_line_for(code_object)).
43
- with_line_numbers(use_line_numbers?).highlighted
43
+ with_line_numbers(use_line_numbers?)
44
44
  end
45
45
  end
46
46
 
@@ -88,7 +88,7 @@ class Pry
88
88
 
89
89
  def add_expression(arguments)
90
90
  expressions << Expression.new(_pry_, target, arg_string)
91
- output.puts "Watching #{Code.new(arg_string).highlighted}"
91
+ output.puts "Watching #{Code.new(arg_string)}"
92
92
  end
93
93
 
94
94
  def add_hook
@@ -6,7 +6,7 @@ class Pry
6
6
  def initialize(_pry_, target, source)
7
7
  @_pry_ = _pry_
8
8
  @target = target
9
- @source = Code.new(source).strip
9
+ @source = source.strip
10
10
  end
11
11
 
12
12
  def eval!
@@ -15,7 +15,7 @@ class Pry
15
15
  end
16
16
 
17
17
  def to_s
18
- "#{Code.new(source).highlighted.strip} => #{value}"
18
+ "#{Code.new(source).strip} => #{value}"
19
19
  end
20
20
 
21
21
  # Has the value of the expression changed?
@@ -89,7 +89,7 @@ class Pry
89
89
  set_file_and_dir_locals(@file)
90
90
 
91
91
  out = "\n#{text.bold('From:')} #{location}:\n\n" <<
92
- code.with_line_numbers(use_line_numbers?).with_marker(marker).highlighted << "\n"
92
+ code.with_line_numbers(use_line_numbers?).with_marker(marker) << "\n"
93
93
 
94
94
  _pry_.pager.page out
95
95
  end
data/lib/pry/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Pry
2
- VERSION = "0.10.0.pre2"
2
+ VERSION = "0.10.0.pre3"
3
3
  end
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.10.0.pre2
4
+ version: 0.10.0.pre3
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: 2014-05-07 00:00:00.000000000 Z
13
+ date: 2014-05-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coderay