Project

General

Profile

Bug #14324

Updated by nobu (Nobuyoshi Nakada) almost 7 years ago

``` 
 $ ruby -e 'p RuntimeError.new("foo").full_message' 
 "\e[1mTraceback \e[m(most recent call last):\n-e:1:in `full_message': \e[1mfoo (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m" 
 ``` 

 That is probably not intended. 

 ``` 
 $ ruby -e 'p RuntimeError.new("foo").full_message' |& cat 
 "-e:1:in `full_message': foo (RuntimeError)\n" 
 ``` 

 So `Exception#full_message` Exception#full_message depends if stderr is a tty which seems wrong. 
 I think it should be the second result, i.e., no escape sequences.

Back