ruby - How to return the exception stack trace to normal, when using win32console gem? -
- ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]
- win32console (1.3.2 x86-mingw32)
- wirble (0.1.3)
- windows 7
i've started using wirble colorize irb output , read needed have win32console gem have color, otherwise color codes.
that has worked until noticed exception stack trace looked different , missing information. i've narrowed down win32console.
simple example without win32console:
irb(main):001:0> 1/0 zerodivisionerror: divided 0 (irb):1:in `/' (irb):1 c:/ruby193/bin/irb:12:in `<main>' irb(main):002:0>
simple example win32console:
irb(main):003:0> 1/0 #<class:0x57a7598>: divided 0 (irb):3:in `/' (irb):3 irb(main):004:0>
is there way change keep colored output?
found out issue has been logged before , guess never added actual gem see here since posts 4 years old.
basically change line s = t.dup.to_s
s = t.to_s.dup
in lib\win32\console\ansi.rb
in def _printstring(t)
method.
Comments
Post a Comment