lib/pry-moves/pry_ext.rb in pry-moves-1.0.3 vs lib/pry-moves/pry_ext.rb in pry-moves-1.0.4
- old
+ new
@@ -40,13 +40,13 @@
end
alias run_origin_for_pry_moves run
def run(command_string, *args)
Pry.config.original_user_input = self.class.original_user_input
- result = run_origin_for_pry_moves command_string, *args
+ run_origin_for_pry_moves command_string, *args
+ ensure
Pry.config.original_user_input = nil
- result
end
end
Pry::CommandSet.class_eval do
@@ -91,10 +91,14 @@
lines << " ." + formatter.method_signature(target)
lines << ''
lines << "#{code.with_line_numbers(use_line_numbers?).with_marker(marker).highlighted}"
lines << PryMoves::Watch.instance.output(target) unless PryMoves::Watch.instance.empty?
- lines.concat PryMoves.messages
+ lines.concat(PryMoves.messages.map do |message|
+ message
+ # message.length > MAX_MESSAGE_CHARS ?
+ # message[0 .. MAX_MESSAGE_CHARS] + "... (cut)" : message
+ end)
PryMoves.messages.clear
lines << ''
lines.join "\n"
end
\ No newline at end of file