Project

General

Profile

Bug #11969

Updated by noniq (Stefan Daschek) over 8 years ago

If IRB shows irb displays a backtrace that gets truncated because of `back_trace_limit`, the last line of the backtrace does not end with a newline. 

 Steps to reproduce: 

 ~~~ 
 $ irb -f --back-trace-limit 1 
 irb(main):001:0> foo 
 ~~~ 

 Actual output: 

 ~~~ 
 NameError: undefined local variable or method `foo' for main:Object 
 Did you mean?    fork 
	 from (irb):1 
	 from /Users/stefan/.rbenv/versions/2.3.0/bin/irb:11:in `<main>'irb(main):002:0>  
 ~~~ 

 Expected output: 

 ~~~ 
 NameError: undefined local variable or method `foo' for main:Object 
 Did you mean?    fork 
	 from (irb):1 
	 from /Users/stefan/.rbenv/versions/2.3.0/bin/irb:11:in `<main>' 
 irb(main):002:0>  
 ~~~ 

 Tested with Ruby 2.3.0, but this seems to affect older versions as well. The IRB

Back