diff --git a/debug.gemspec b/debug.gemspec index f05d0faa7..a07018a77 100644 --- a/debug.gemspec +++ b/debug.gemspec @@ -28,5 +28,5 @@ Gem::Specification.new do |spec| spec.extensions = ['ext/debug/extconf.rb'] spec.add_dependency "irb", ">= 1.5.0" # for binding.irb(show_code: false) - spec.add_dependency "reline", ">= 0.3.1" + spec.add_dependency "reline", ">= 0.3.8" end diff --git a/lib/debug/console.rb b/lib/debug/console.rb index 2da261662..b44868899 100644 --- a/lib/debug/console.rb +++ b/lib/debug/console.rb @@ -56,10 +56,10 @@ def readline_setup prompt Reline.prompt_proc = -> args, *kw do case state = parse_input(args.first, commands) when nil, :command - [prompt, prompt] + [prompt] when :ruby - [prompt.sub('rdbg'){colorize('ruby', [:RED])}] * 2 - end + [prompt.sub('rdbg'){colorize('ruby', [:RED])}] + end * args.size end Reline.completion_proc = -> given do @@ -96,7 +96,7 @@ def readline_setup prompt when nil buff when :ruby - colorize_code(buff.chomp) + colorize_code(buff) end end unless CONFIG[:no_hint] diff --git a/test/console/backtrace_test.rb b/test/console/backtrace_test.rb index 52b1238a1..dd1316ee5 100644 --- a/test/console/backtrace_test.rb +++ b/test/console/backtrace_test.rb @@ -22,7 +22,7 @@ def program 14| end 15| end 16| - 17| 3.times do + 17| [1, 2, 3].each do 18| Foo.new.first_call 19| end RUBY @@ -33,7 +33,7 @@ def test_backtrace_prints_c_method_frame type 'b 18' type 'c' type 'bt' - assert_line_text(/\[C\] Integer#times/) + assert_line_text(/\[C\] Array#each/) type 'kill!' end end